Index: nice_menus.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/nice_menus/nice_menus.module,v
retrieving revision 1.48
diff -u -p -r1.48 nice_menus.module
--- nice_menus.module	11 Jul 2008 15:27:38 -0000	1.48
+++ nice_menus.module	6 Aug 2008 12:45:46 -0000
@@ -194,7 +194,7 @@ function nice_menus_theme() {
       'arguments' => array('menu_name' => NULL, 'mlid' => NULL, 'menu' => NULL),
     ),
     'nice_menu_build' => array(
-      'arguments' => array('menu' => NULL),
+      'arguments' => array('menu' => NULL, 'menu_name' => NULL),
     ),
     'nice_menu' => array(
       'arguments' => array('id' => NULL, 'menu_name' => NULL, 'mlid' => NULL, 'direction' => 'right', 'menu' => NULL),
@@ -283,7 +283,7 @@ function theme_nice_menu_tree($menu_name
   $output['subject'] = $title;
 
   if ($menu) {
-    $output['content'] .= theme('nice_menu_build', $menu);
+    $output['content'] .= theme('nice_menu_build', $menu, $menu_name);
   }
 
   return $output;
@@ -295,8 +295,15 @@ function theme_nice_menu_tree($menu_name
  * @param $menu
  *   Menu array from which to build the nested lists.
  */
-function theme_nice_menu_build($menu) {
+function theme_nice_menu_build($menu, $menu_name) {
   $output = '';
+  
+  // 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'];
@@ -308,14 +315,17 @@ function theme_nice_menu_build($menu) {
       $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']))) {
         // Keep passing children into the function 'til we get them all.
         $children = theme('nice_menu_build', $menu_item['below']);
         // Set the class to parent only of children are displayed.
-        $parent_class = $children ? 'menuparent ' : '';
-        $output .= '<li id="menu-'. $mlid .'" class="'. $parent_class . $path_class .'">'. theme('menu_item_link', $menu_item['link']);
+        $class .= $children ? 'menuparent ' : '';
+        // Add an expanded class for items in the menu trail.
+        $class .= in_array($mlid, $trail_ids) ? ' expanded' : '';   
+        $output .= '<li id="menu-'. $mlid .'" class="'. $class .'">'. theme('menu_item_link', $menu_item['link']);
+        
         // Build the child UL only if children are displayed for the user.
         if ($children) {
           $output .= '<ul>';
@@ -325,7 +335,7 @@ function theme_nice_menu_build($menu) {
         $output .= "</li>\n";
       }
       else {
-        $output .= '<li id="menu-'. $mlid .'" class="'. $path_class .'">'. theme('menu_item_link', $menu_item['link']) .'</li>'."\n";
+        $output .= '<li id="menu-'. $mlid .'" class="'. $class .'">'. theme('menu_item_link', $menu_item['link']) .'</li>'."\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	6 Aug 2008 12:45:47 -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;
