Hi Drupal Ninjas!
This problem is driving me crazy! I needed Drupal 6 for it's Multilanguage functions which where not good enough in Drupal 5.
The problem:
I have a right sidebar with my secondary links in a block. My secondary links contain 3 links.
I need these 3 links to have a different icons in front of the link. Was trying to accomplish this by adding an extra css class to the list item formed by Drupal.
Default Output
<ul class="menu">
<li class="leaf first"><a href="http://#" title="title">button</a></li>
<li class="leaf"><a href="http://#" title="title">button</a></li>
<li class="leaf last"><a href="http://#" title="title">button</a></li>
</ul>
But....... I can't hook the list item for only my secondary menu block. When I hook the theme_menu_item_link(), I can add and extra class, but this will be used by all menu items.
This function don't receive a menu id, and I can't make an exeption within this function.
What I really would like to accomplish is:
<ul class="menu">
<li class="leaf first 1"><a href="http://#" title="title">button</a></li>
<li class="leaf 2"><a href="http://#" title="title">button</a></li>
<li class="leaf last 3"><a href="http://#" title="title">button</a></li>
</ul>
Just add numbers to the link class of my secondary links to add an icon in the stylesheet li property.
I tried to make a view, but view links also use the menu_item_link function, so that's not helping me.
Does anybody have an idea how I can accomplish this?
Thanks!
Comments
HI
Hi,
Just see this link to get better idea about to addding icon to primary links.Just try this way.
http://drupal.org/node/62149
Thanks,
Raj.
Thanks
Thanks Raj,
Though it's a workable sollution, I hope they modifiy Drupal 7 so that all links and link blocks can be completely overwritten, also for SEO purposes I can see situaties where you want to put a hx tag inside a link.
any help?
i would like to do the same thing you are asking, dreamlabs
did you find a solution yet?