Hey Guys,

I'm trying to override a menu function, theme_menu_item(), so i can add a custom ID attribute to just one of the LI elements. The only thing that is hanging me up is finding a variable to test against so i an find the correct LI element to assign this ID to.

Originally, i was using the theme_menu_links() function, overriding that and testing the $links['title'] variable to see if it was the correct LI i wanted, then assigned an ID.

I'm pretty new to PHP and Drupal in general, but i'm getting better everday.

Can someone please help?

Comments

maxl’s picture

I realize that things are busy @ Drupal but I know someone knows how to do this.

What variable can i use to get the 'title' attribute for the menu item overiding the above function???

Street-1’s picture

I came across your post here looking for a similar solution. After some more searching I came across this post:

http://drupal.org/node/144603

Not quite what you are looking for, since it adds a unique id to all menu items, but that does not seem to high a price to pay, since no core hacking is required.