Top navigation as submenu in magento

If you would like to show your magento store categories like as in picture then you are on right place.
navigation_as_submenu

Replace this code in topmenu.phtml

<?php $_menu = $this->getHtml(‘level-top’) ?>
<?php if($_menu): ?>
<div class=”nav-container”>
<ul id=”nav”>
<?php echo $_menu ?>
</ul>
</div>
<?php endif; ?>

with below

<?php $_menu = $this->getHtml(0,’level-top’) ?>
<?php if($_menu): ?>
<div class=”nav-container”>
<ul id=”nav”>
<li class=”level0 nav-1 first level-top parent” id=”home”>
<a class=”level-top” href=”<?php echo Mage::getBaseUrl();?>”>
<span>Home</span></a>
</li>
<li class=”level0 nav-1 first last level-top parent” id=”products”>
<a class=”level-top”><span>Products</span></a>
<ul class=”level0″>
<?php echo $_menu ?>
</ul>
</li>
<li class=”level0 nav-1 last level-top parent” id=”contact_us”>
<a class=”level-top” href=”<?php echo Mage::getBaseUrl().’contacts’;?>”>
<span>Contact Us</span></a>
</li>
</ul>
<?php endif ?>

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *