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
You can resolve this issue by editing target URL from URL rewrite management.
- On the Admin menu, select Catalog > URL Rewrite Management.
- 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 "/"
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
<?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>
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.