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

How modify li tag in top navigation (SOLVED i think….)
 
IgNoCh
Jr. Member
 
Total Posts:  3
Joined:  2008-09-26
 

Hi…

i like to know how to modify li tag class in top navigation?
Example:

in default li show:

<li class="level0 nav-shop-online active">
<
a href="http://aita.localhost/shop-online"><span>Shop Online</span></a>
</
li>

to this:

<li id="menuShopOnline">
<
a href="http://aita.localhost/shop-online" title="Shop Online...">Shop Online</a>
</
li>
 
Magento Community Magento Community
Magento Community
Magento Community
 
IgNoCh
Jr. Member
 
Total Posts:  3
Joined:  2008-09-26
 

Well.. checking the API i made a custom li tag with Varient_Object methods (which i think are others ways to do that, i know now.. im new in magento grin )

<ul id="primaryNavigation">
<?php foreach ($this->getStoreCategories() as $_category): ?>
    
<li id="menu<?php echo str_replace(" ","",$_category->getName()); ?>"><a href="<?php echo $this->getUrl().$_category->getRequestPath() ?>"><?php echo $_category->getName(); ?></a></li>
<?php endforeach ?>
</ul>

i made this changes in template/catalog/navigation/top.phtml

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