Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Add links to top menu
 
mudmad
Jr. Member
 
Total Posts:  5
Joined:  2011-02-19
 

Hi everyone,

I’m new to magento and i’m struggling a bit here, I’m trying to add a “home” and a “contact us” link to the top links section on my site.

I have seen various threads on here about this but all are a little different , and which ever way i try i just cant get it to work correctly.

I.m running magento 1.8.1 and the file i’m working on is customer.xml

I can get the links to show and they work correctly from the home page, but if i follow the contact us link and then i click the home link it gets messed up

any help would be appreciated

 
Magento Community Magento Community
Magento Community
Magento Community
 
CommerceBees
Jr. Member
 
Avatar
Total Posts:  18
Joined:  2014-01-30
Schaumburg, IL
 

Hi mudmad,

To add a custom link to the top navigation bar you need to edit the “top.phtml” file of your theme.

If, for example, you use the default theme the path to the file on your hosting account will be

app/design/frontend/base/default/template/catalog/navigation/top.phtml. In the file find the following code:

<div class="nav-container">

<
ul id="nav">

<?php echo $_menu ?>

</ul>

</
div>

Between the <ul> tags put the following code:

<li><a href="http://yourdomain.com/city/subcategory"><span>Your Menu Link Name</span></a></li>

So that the code looks like this:

<div class="nav-container">

<
ul id="nav">

<?php echo $_menu ?>

<li><a href="http://yourdomain.com/city/subcategory"><span>Your Menu Link Name</span></a></li>

</
ul>

</
div>

Then flush the cache and refresh the frontend of your site.

Hope this helps

Thanks,
CommerceBees

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top