This is a big usability issue that's been haunting us for months: how do you get a top-level menu item to stay active when you've navigated to a page within that section?
On a top level (L1) page, we have no problem getting the top-most menu to have a CSS class of active, when you're on the page.
If you navigate to another page within that section, we'd like to keep the "active" class on the L1 page. We've written the following function for template.php that's great for highlighting the child items, but we're stumped as to how to get the parent item to also have an "active" CSS class.
/** add images to menu titles, and adds special characters to active menu items **/
function phptemplate_menu_item_link($item, $link_item) {
if( strpos($item['title'], '
return l($item['title'], $link_item['path'], !empty($item['description']) ? array('title' => $item['description']) : array(), NULL, NULL, FALSE, TRUE);
}
$this_page = menu_get_active_title();
if ($item['title'] == $this_page || drupal_is_front_page() && $item['title'] == "Home" || $active) {
return "". $item['title'] ."
\n";
}
else {