diff --git a/nice_menus.module b/nice_menus.module index 134f669..cb01e5b 100644 --- a/nice_menus.module +++ b/nice_menus.module @@ -419,6 +419,8 @@ function theme_nice_menus_build($menu, $depth = -1, $trail = NULL) { $first_class = $index == 1 ? ' first ' : ''; $oddeven_class = $index % 2 == 0 ? ' even ' : ' odd '; $last_class = $index == $count ? ' last ' : ''; + $current_depth = $menu_item['link']['depth'] - 1; + $current_depth_class = " depth-$current_depth "; // Build class name based on menu path // e.g. to give each menu item individual style. // Strip funny symbols. @@ -435,7 +437,7 @@ function theme_nice_menus_build($menu, $depth = -1, $trail = NULL) { $children = theme('nice_menus_build', $menu_item['below'], $depth, $trail); // Set the class to parent only of children are displayed. $parent_class = ($children && ($menu_item['link']['depth'] <= $depth || $depth == -1)) ? 'menuparent ' : ''; - $output .= '