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 the following submenu on the left
OptionA
OptionB
OptionC

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

Currently I am using active class but this only activates the current link that matches the url I am in. So in the previous case only "OptionC" is underlined and not "Section A".

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. I feel I am terunning around in circles... 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 desctiption of my problem is not very clear, i tried my best.
thanks.

enrike

Comments

urrestieta’s picture

I think this pseudocode describes what I would need to be able to do at the function phptemplate_menu_item_link

if current menu item belongs to menu "Main" do this
else if current menu item belongs to menu "SubmenuA" do that
else if current menu item belongs to menu "SubmenuB" do somethingelse

enrike