Add Home Link To The Menu Bar
This will allow you to add a Home link in the main navigation bar where product categories are listed. Find the file called top.phtml in the folder at app/design/frontend/default/default/template/catalog/navigation/ and make the following change:
<div class="header-nav-container">
<div class="header-nav">
<h4 class="no-display"><?php echo $this->__('Category Navigation:') ?></h4>
<ul id="nav">
<!-- HOME BUTTON HACK -->
<?php $_anyActive = false; foreach ($this->getStoreCategories() as $_category) { $_anyActive = $_anyActive || $this->isCategoryActive($_category); } ?>
<li class="<?php echo !$_anyActive ? 'active' : '' ?>"><a href="<?php echo $this->getUrl('')?>"><?php echo $this->__('Home') ?></a></li>
<!-- HOME BUTTON HACK -->
<?php foreach ($this->getStoreCategories(10) as $_category):?>
<?php echo $this->drawItem($_category) ?>
<?php endforeach ?>
</ul>
</div>
<?php echo $this->getChildHtml('topLeftLinks') ?>
</div>
Add Home Link To The Top Links Bar
This will allow you to add a Home link in the Top Links (My Account | My Wishlist | Etc.) before the My Account.Find the file called links.phtml in the folder at app/design/frontend/default/default/template/page/template/ and make the following change:
<?php $_links = $this->getLinks(); ?>
<?php if(count($_links)>0): ?>
<div>
<ul<?php if($this->getName()): ?>):?> id="<?php echo $this->getName() ?>"<?php endif;?>>
<!-- HOME BUTTON HACK -->
<li class="first"><a href="<?php echo $this->getUrl('')?>"><?php echo $this->__('Home') ?></a></li>
<!-- HOME BUTTON HACK -->
<?php foreach($_links as $_link): ?>
<li <?php if($_link->getIsLast()): ?> class="last"<?php endif; ?><?php echo $_link->getLiParams() ?>><?php echo $_link->getBeforeText() ?><a href="<?php echo $_link->getUrl() ?>" title="<?php echo $_link->getTitle() ?>" <?php echo $_link->getAParams() ?>><?php echo $_link->getLabel() ?></a><?php echo $_link->getAfterText() ?></li>
<?php endforeach; ?>
</ul>
</div>
<?php endif; ?>
NOTE: The if statement in the foreach loop has changed since "Home" will always be first, it wasn’t needed. Also note that the <li> for the "Home" link automatically gets the class "first".
