1

I want home menu in top Navigation. But One thing is that , i Created root category and that link to top navigation. In that root category i already add Home category but that leads to http://www.xyz.com/home.phml page but i want http://www.xyz.com In that case we have to write store URL in URL_key line but that also can't accept. so help me. Thanks.

3 Answers 3

2

You can resolve this issue by editing target URL from URL rewrite management.

  1. On the Admin menu, select Catalog > URL Rewrite Management.
  2. In the list, find the entry for the subcategory you created. If you can't find it do the following: In the filter box at the top of the Request Path column, type the URL key for the subcategory you created, and click the Search button. In this example, the Request Path is “home.html” change its target path to "/"
2

Add this code in your menu file. check using system->developer select store Template path hint option enable.

default file path template/catalog/navigation/top.phtml

enter image description here

<?php
     $routeName = Mage::app()->getRequest()->getRouteName();
     $identifier = Mage::getSingleton('cms/page')->getIdentifier(); 
?>

After

<ul id="nav">

  <li class="level0 home level-top <?php if($routeName == 'cms' && $identifier == 'home') {echo " active";}?>">
  <a href="<?php echo $this->getBaseUrl(); ?>" class="level-top"><span><?php echo $this->__('Home'); ?></span></a>
</li> 
0
1

It can be done in your topmenu.phtml file in your theme. All the navigation menu are come from this file you just have to add the link over there staticaly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.