Try the Demo

Magento Forum

   
Attaching a class to the wishlist <li> tag
 
PercivalLowell
Jr. Member
 
Avatar
Total Posts:  2
Joined:  2007-10-08
 

I would like to add a class to the

<li>

tag so when viewed from source, it will look like this:

<li class="next">

I *believe* the solution resides in app/code/core/Mage/Page/Block/Html/Toplinks.php.

$this->_prepareArray($toplinkInfo, array('liParams''aParams''innerText''beforeText''afterText''first''next''last'));

I see that array is being called that contains the names some of the classes/variables in app/design/frontend/default/default/template/page/html/top.links.phtml.

Not being anywhere near fluent in PHP, I’m unsure how to add this class.  Any ideas?

Thanks for your time.

Image Attachments
after.gif
 
Magento Community Magento Community
Magento Community
Magento Community
 
Moshe
Magento Team
 
Avatar
Total Posts:  1770
Joined:  2007-08-07
Los Angeles
 

in main.xml layout file you have <liParams> argument in <addLink> - use it to specify LI parameters:

<liParams>class="next"</liParams>

 Signature 

- I would love to change the world, but they won’t give me the source code -

 
Magento Community Magento Community
Magento Community
Magento Community
 
PercivalLowell
Jr. Member
 
Avatar
Total Posts:  2
Joined:  2007-10-08
 

I can’t seem to locate “main.xml”; do you have a path to it’s location?

Thanks again for your time.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Moshe
Magento Team
 
Avatar
Total Posts:  1770
Joined:  2007-08-07
Los Angeles
 

Sorry, it’s in app/design/frontend/default/default/layout/main.xml

 Signature 

- I would love to change the world, but they won’t give me the source code -

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