function theme_menu_item in Drupal 6
Same name and namespace in other branches
- 4 includes/menu.inc \theme_menu_item()
- 5 includes/menu.inc \theme_menu_item()
Generate the HTML output for a menu item and submenu.
Related topics
1 theme call to theme_menu_item()
- menu_tree_output in includes/
menu.inc - Returns a rendered menu tree.
File
- includes/
menu.inc, line 1151 - API for the Drupal menu system.
Code
function theme_menu_item($link, $has_children, $menu = '', $in_active_trail = FALSE, $extra_class = NULL) {
$class = $menu ? 'expanded' : ($has_children ? 'collapsed' : 'leaf');
if (!empty($extra_class)) {
$class .= ' ' . $extra_class;
}
if ($in_active_trail) {
$class .= ' active-trail';
}
return '<li class="' . $class . '">' . $link . $menu . "</li>\n";
}