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

Adding Home, contact to the nav bar ---SOLVED---
 
nappy155
Jr. Member
 
Total Posts:  25
Joined:  2009-08-10
 

I would like to add a “home” and “contact” links to the nav bar (see attached) i found a number of post showing how to add these items to the very top nav, (next to my cart, account, etc) but, not to the nav bar where the categories links are....

thanks in advance

Image Attachments
Picture 2.png
 
Magento Community Magento Community
Magento Community
Magento Community
 
Gyniolatry
Sr. Member
 
Total Posts:  132
Joined:  2009-11-26
Perth.au
 

In app\design\frontend\default\default\template\catalog\navigation\top.phtml

<div class="header-nav">
        <
ul id="nav">

<!-- 
Add the following line to add a link to a CMS page called 'hompage'the link name will be 'Home' -->
<
li><a href="<?php echo $this->getUrl('homepage')?>"><span><?php echo $this->__('Home'?></span></a></li>
  
 <!-- 
This section  will loop through and create links for your category pages  -->        
 
<?php foreach ($this->getStoreCategories() as $_category): ?>
 <?php 
echo $this->drawItem($_category?>
 <?php 
endforeach ?> 

<!-- Add the following line to add a link to a CMS page called 'contactus',  after your category links -->    
<
li><a href="<?php echo $this->getUrl('contactus')?>"><span><?php echo $this->__('Contact Us'?></span></a></li>    
        </
ul>
</
div>
 
Magento Community Magento Community
Magento Community
Magento Community
 
nappy155
Jr. Member
 
Total Posts:  25
Joined:  2009-08-10
 

That didn’t do anything...i am using an installed template…

the file app\design\frontend\default\default\template\catalog\navigation\top.phtml doesn’t effect anything
...in fact i deleted it to see if there was any effect and there wasn’t

...I assuming that the installed template is over-riding something but i find what.....

any suggestions...?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Gyniolatry
Sr. Member
 
Total Posts:  132
Joined:  2009-11-26
Perth.au
 

Try app\design\frontend\*Your_interface*\*Your_theme*\template\catalog\navigation\top.phtml

 
Magento Community Magento Community
Magento Community
Magento Community
 
nappy155
Jr. Member
 
Total Posts:  25
Joined:  2009-08-10
 

G-that worked the links are showing up but, the links are broken.....

 
Magento Community Magento Community
Magento Community
Magento Community
 
aloktigga
Member
 
Avatar
Total Posts:  54
Joined:  2009-04-27
India
 

use these links for home and contact us.

<a href="<?php echo $this->getUrl('home')?>"><span><?php echo $this->__('Home') ?></span></a>

<a href="<?php echo $this->getUrl('contacts')?>"><span><?php echo $this->__('Contac Us') ?></span></a>

 
Magento Community Magento Community
Magento Community
Magento Community
 
Gyniolatry
Sr. Member
 
Total Posts:  132
Joined:  2009-11-26
Perth.au
 

hmm..  Check your Base Url in admin>system >web

 
Magento Community Magento Community
Magento Community
Magento Community
 
nappy155
Jr. Member
 
Total Posts:  25
Joined:  2009-08-10
 

Cheers.....Gyniolatry all is well...thanks so much for your help...!

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