Add Home Link with functional active state to Menu Bar (Alternative Method)

Last modified by JJ Pagac on Thu, June 24, 2010 17:02
Source|Old Revisions  

This is an old revision of the document!

Add Home Link to Menu Bar

For the Home link in the menu bar of the main template you can add some code to one of the template files.

Find the file called top.phtml in app/design/frontend/default/default/template/catalog/navigation/ and make the following change:

  1. <div class="header-nav-container">
  2.     <div class="header-nav">
  3.         <h4 class="no-show">Category Navigation:</h4>
  4.         <ul id="nav">
  6.         <!-- HOME BUTTON HACK -->
  7.         <li><a href="<?=$this->getUrl('')?>">Home</a></li>
  8.         <!-- HOME BUTTON HACK -->
  10.         <?foreach ($this->getStoreCategories(10) as $_category):?>
  11.             <?=$this->drawItem($_category)?>
  12.         <?endforeach?>
  13.         </ul>
  14.     </div>
  15. </div>
Related Tags:  Link Home Magento 1.5


Magento 2 GitHub Repository

Magento Job Board - Some sort of tag line goes here

Latest Posts| View all Jobs