Beautifull module for mixing horizontal and vertical related menu's!

But how can I higlight the parent menu item when a child is active?
The example on the demo site has this relation, how do I do that?

Comments

mediamash’s picture

i'm looking for this solution too. The Demo site has active classes for each submenu. So i think they have alterd the output for that. Anyone knows how to do that?

Anonymous’s picture

I did not get this working with Menu Block Split.

I found another module: slicedmenu.module who does the trick: http://drupal.org/project/slicedmenu. You get an active class in main- and submenu to use in .css

css example:

#block-slicedmenu-0 ul.menu .active {
background-color: #E97001;
color: White;
}

#block-slicedmenu-1 li a.active {
color: White;
}

mediamash’s picture

msn, does the mainmenu remain active when clicking several submenus?

Anonymous’s picture

yes

Try it out on: http://www.mirakel.cmseasy.nl/test
login with: gast / gast

robertgarrigos’s picture

Status: Active » Fixed

I achieved that functionality by overriding the theme_menu_item function. This is the actual function I'm using with that theme on the demo site:

function escoles_menu_item($mid, $children = '', $leaf = TRUE) {
  return '<li class="'. ($leaf ? 'leaf' : ($children ? 'expanded' : 'collapsed')) . (menu_in_active_trail($mid) ? ' actual' : '') .'">'. menu_item_link($mid) . $children ."</li>\n";
}

You need to add this function to your template.php file in your theme. Change the name of the function escoles_menu_item to thenameofyourtheme_menu_item (look in the handbook for overriding theme functions: http://drupal.org/node/55126). I'm using a class 'actual' in the css to highlight the parent menu item. You can change the name of that class to any other you might be using.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

LRHoek-1’s picture

#5

I'm trying to achieve this in Drupal 6, but have been unsuccessful so far. Since the theme_menu_item function is fairly different from the one in 5, I just can't figure this one out. Positioning of the menus works fine, but setting a seperate class for the parent of an active child hasn't worked for me yet. Any pointers on this?