diff --git nice_menus.module nice_menus.module index 4334daa..a4a8099 100644 --- nice_menus.module +++ nice_menus.module @@ -429,13 +429,17 @@ function theme_nice_menus_build($menu, $depth = -1, $trail = NULL) { if ($trail && in_array($mlid, $trail)) { $class .= ' active-trail'; } + + // Add menu item depth. + $item_depth = ' depth-'. $menu_item['link']['depth']; + // 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_menus_build', $menu_item['below'], $depth, $trail); // Set the class to parent only of children are displayed. $parent_class = $children ? 'menuparent ' : ''; - $output .= '\n"; } else { - $output .= ''."\n"; + $output .= ''."\n"; } } }