Adding Links to your Top Menu
Many people wonder how you go by adding additional links to your Category menu items on Magento. This is another straight forward tutorial and will break it down for you to make it as simple as possible.
To get started you will need to locate and open “app/design/frontend/default/<yourtheme>/template/catalog/navigation/top.phtml” file. Once opened, scroll down and you will see something that sort of look like this:
<ul id="nav">
<li><a href="<?php echo $this->getUrl('')?>"><span>
<?php echo $this->__('Homepage') ?></span></a></li>
<?php foreach ($this->getStoreCategories() as $_category): ?>
<?php echo $this->drawItem($_category) ?>
<?php endforeach ?>
</ul>
As you can see the Homepage link is an additional link I have added as an example. Now I will show you what it will look like to add a new additional link after the categorie links are shown:
<ul id="nav">
<li><a href="<?php echo $this->getUrl('')?>"><span>
<?php echo $this->__('Homepage') ?></span></a></li>
<?php foreach ($this->getStoreCategories() as $_category): ?>
<?php echo $this->drawItem($_category) ?>
<?php endforeach ?>
<li><a href="http://yourdomain.com/"><span>
<?php echo $this->__('New Link Here') ?></span></a></li>
</ul>
This way you can now change “http://yourdomain.com” to destination you would like to choose aswell as ‘New Link Here’ to the name of the link you would like to use.
To remove any of the additional links just delete the starting and ending tags of the links, for example:
<ul id="nav">
<?php foreach ($this->getStoreCategories() as $_category): ?>
<?php echo $this->drawItem($_category) ?>
<?php endforeach ?>
</ul>
From hellothemes.com
Related posts:

Thank you for this! Simple yet concise.
Thanx for providing such a simple code to implement the above topic in magento site.it worked…
Thank you greatly for the simple solution. Fast and to the point.
We appreciate it.
ape
Support
Latest Project
Our Work
Popular Tags
Recent Comments
Categories
Services
© 2009 Asia-Connect.com.vn. All Rights Reserved. Powered by WordPress | Log in