title: Magento - Removing Active State From Home Page
body: <p>I have this code in top.phtml which displays my menu items in my Magento store:</p>
  
  <pre><code>&lt;div class="header-nav-container"&gt; 
  &lt;div class="header-nav"&gt; 
  &lt;h4 class="no-display"&gt;&lt;?php echo $this-&gt;__('Category Navigation:') ?&gt;&lt;/h4&gt; 
  &lt;ul id="nav"&gt; 
  &lt;li &lt;?php if(!Mage::registry('current_category')) { echo 'class="level0 active"'; } else { echo 'class="level0"'; } ?&gt;&gt;&lt;a href="&lt;?php echo $this-&gt;getUrl('') ?&gt;"&gt;&lt;span&gt;&lt;?php echo $this-&gt;__('Home') ?&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt; 
  &lt;?php foreach ($this-&gt;getStoreCategories() as $_category): ?&gt; 
  
  &lt;?php echo $this-&gt;drawItem($_category) ?&gt; 
  &lt;?php endforeach ?&gt; 
  &lt;li &lt;?php if(!Mage::registry('current_category')) { echo 'class="level0 active"'; } else { echo 'class="level0"'; } ?&gt;&gt;&lt;a href="&lt;?php echo $this-&gt;getUrl('catalogsale')?&gt;"&gt;&lt;span&gt;&lt;?php echo $this-&gt;__('Sale Items') ?&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt; 
  &lt;/ul&gt; 
  
  &lt;/div&gt;
  </code></pre>
  
  <p>I have an extra <code>li</code> at the bottom which displays another page.  The problem I have occurs when I click the ‘Sales Item’ page: its link becomes active but so does the home page link.  How can I prevent the home page link from appearing active?</p>
  
  <p>I’ve added a screenshot to show the problem:
  <a href="http://skitch.com/a1anm/npga5/magento-commerce" rel="nofollow noreferrer">Screenshot</a></p>