underline links on different menusmenu_get_menu()

urrestieta - February 25, 2008 - 18:33

hi

I need to underline menu links in different menus at the same time. I have a menu system where each section has a different submenu with few items. I need that when the user enters on a section on the submenu BOTH the item in that submenu and the parent item in the main menu remain underlined.

For example:
main menu on the header -> SectionA | Section B | SectionC

if I click on "SectionA", i get thye following submenu on the left
OptionA
OptionB
OptionC

If I click on "OptionC" I want both "Section A" and "OptionC" to remain underlined.

Currently I am using active but this only activates the current link that matches the url I am in. So in the later case only "OptionC" is underlined.

I have been checking all kinds of solutions I found in forums but none seem to work for me. I have been testing some functions on the template.php file to customise the links on the menus. So far I am able to include the class active in all menu items, so I just need some method to differentiate the good "links" from the "bad" links.

I tried using the url path but it does not work as I would need to distinguise in which menu are the links in. Is there anyway to know which menu an item is located in from the phptemplate_menu_item_link() function at template.php? I dont understand very well the namespace in drupal.

sorry if this is not very clear, i tried my best.
thanks.

enrike

 
 

Drupal is a registered trademark of Dries Buytaert.