magento: vertical navigation category with links
this code works for vertical navigation category…
<?php
/**
* Top menu for store
*
* @see Mage_Catalog_Block_Navigation
*/
?>
<div class=”box_mini_vert”>
<div id=”vertical-nav-container “>
<?php foreach ($this->getStoreCategories() as $_category): ?>
<?php foreach ($this->getCurrentChildCategories() as $_categories): ?>
/*in this line $_categories->getUrl() is present so you can get link of your categories*/
<ul class=”vert_left_list_style”>
<li><b><?php echo ‘<br/>’ ?><a href=”<?php echo $_categories->getUrl() ?>”><?php echo $_categories->getName(); ?></a></b></li>
</ul>
<ul>
<?php foreach ($_categories->getChildren() as $childcategory):?>
<?php echo $this->drawItem($childcategory) ?>
<?php endforeach; ?>
</ul>
<?php endforeach; ?>
</div>
</div>
never expect any code is perfect for you, because someone has developed some code for some other work,,,, you just get help from that and if it is compatible to you then use it… but you must unserstand it before you use it…
ok??
![OMG ! [ Explore #1 ] OMG ! [ Explore #1 ]](http://static.flickr.com/2631/4150305338_5dd4270c04_t.jpg)


doctorlogos 8:17 am on February 26, 2009 Permalink |
Thanks man.
Yo 4:52 am on March 5, 2009 Permalink |
where do i put that code?
thx
Pierre 4:07 pm on March 10, 2009 Permalink |
Doesn’t work for me :
Parse error: syntax error, unexpected $end in [...]/vert_nav.phtml on line 47
Can you help me ?
Dr. Marco 9:58 am on August 5, 2009 Permalink |
Gr8 Job man.