Index: nice_menus.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/nice_menus/nice_menus.module,v retrieving revision 1.50 diff -u -p -r1.50 nice_menus.module --- nice_menus.module 9 Aug 2008 12:52:40 -0000 1.50 +++ nice_menus.module 9 Aug 2008 13:02:19 -0000 @@ -203,7 +203,7 @@ function nice_menus_theme() { 'arguments' => array('menu_name' => NULL, 'mlid' => NULL, 'depth' => -1, 'menu' => NULL), ), 'nice_menu_build' => array( - 'arguments' => array('menu' => NULL, 'depth' => -1), + 'arguments' => array('menu' => NULL, 'depth' => -1, 'menu_name' => NULL), ), 'nice_menu' => array( 'arguments' => array('id' => NULL, 'menu_name' => NULL, 'mlid' => NULL, 'direction' => 'right', 'depth' => -1, 'menu' => NULL), @@ -309,9 +309,16 @@ function theme_nice_menu_tree($menu_name * @param $menu * Menu array from which to build the nested lists. */ -function theme_nice_menu_build($menu, $depth = -1) { +function theme_nice_menu_build($menu, $depth = -1, $menu_name = NULL) { $output = ''; - //$output .= dpm($menu); + + // Find the active trail and pull out the menus ids. + $active_menu = menu_set_active_menu_name($menu_name); + $trail = menu_get_active_trail($active_menu); + foreach ($trail as $item) { + $trail_ids[] = $item['mlid']; + } + foreach ($menu as $menu_item) { $mlid = $menu_item['link']['mlid']; // Check to see if it is a visible menu item. @@ -322,14 +329,17 @@ function theme_nice_menu_build($menu, $d $clean_path = str_replace(array('http://', '<', '>', '&', '=', '?', ':'), '', $menu_item['link']['href']); // Convert slashes to dashes. $clean_path = str_replace('/', '-', $clean_path); - $path_class = 'menu-path-'. $clean_path; + $class = 'menu-path-'. $clean_path; // If it has children build a nice little tree under it. if ((!empty($menu_item['link']['has_children'])) && (!empty($menu_item['below'])) && $depth != 0) { // Keep passing children into the function 'til we get them all. - $children = theme('nice_menu_build', $menu_item['below'], $depth); + $children = theme('nice_menu_build', $menu_item['below'], $depth, $menu_name); // Set the class to parent only of children are displayed. - $parent_class = $children ? 'menuparent ' : ''; - $output .= '\n"; } else { - $output .= ''."\n"; + $output .= ''."\n"; } } } Index: nice_menus_default.css =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/nice_menus/nice_menus_default.css,v retrieving revision 1.6 diff -u -p -r1.6 nice_menus_default.css --- nice_menus_default.css 29 Oct 2007 16:38:28 -0000 1.6 +++ nice_menus_default.css 9 Aug 2008 13:02:20 -0000 @@ -50,6 +50,12 @@ ul.nice-menu li { background-image: none; } +/* Remove Drupal default styling for expanded menu items. */ +ul.nice-menu li.expanded { + list-style: none; + padding: 0; +} + /* Overrides for Garland header. */ #header-region ul.nice-menu li { margin: 0;