This tutorial shows you how to add a new menu-link to the navigation bar in Magento. This is not as easy as it might seem: You will need to alter either PHP/HTML or XML to accomplish this.

{youtube w4z1RyyFHhU}

In the tutorial a copy of the file app/design/default/default/template/catalog/navigation/top.phtml is added to your own theme. Next, the following PHP/HTML code is added to this PHTML-template:

<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('menu')->toHtml(); ?>

Next a CMS block with ID "menu" needs to be created. The CMS block contains the following HTML:

<li>
<a title="title goes here" href="{{store direct_url="customer-service"}}">
<span>Customer Service</span>
</a>
</li>

Yireo has developed a bridge between Joomla! and Magento. While the above shows how complicated Magento can be, with Joomla! adding a Menu-Item is a breeze (a few mouse-clicks). More information about MageBridge is available here.

Posted on November 16, 2009

About the author

Author Jisse Reitsma

Jisse Reitsma is the founder of Yireo, extension developer, developer trainer and 3x Magento Master. His passion is for technology and open source. And he loves talking as well.

Sponsor Yireo

Upcoming events

Oct
28
Oct
31
LIEF Amsterdam
Nov
08

Looking for a training in-house?

Let's get to it!

We schrijven niet te commerciële dingen, we richten ons op de technologie (waar we dol op zijn) en we komen regelmatig met innovatieve oplossingen. Via onze nieuwsbrief kun je op de hoogte blijven van al deze coolness. Inschrijven kost maar een paar seconden.

Do not miss out on what we say

This will be the most interesting spam you have ever read

We schrijven niet te commerciële dingen, we richten ons op de technologie (waar we dol op zijn) en we komen regelmatig met innovatieve oplossingen. Via onze nieuwsbrief kun je op de hoogte blijven van al deze coolness. Inschrijven kost maar een paar seconden.