| 4.6 menu.inc | theme_menu_item($mid, $children = '', $leaf = TRUE) |
| 4.7 menu.inc | theme_menu_item($mid, $children = '', $leaf = TRUE) |
| 5 menu.inc | theme_menu_item( |
| 6 menu.inc | theme_menu_item($link, $has_children, $menu = '', $in_active_trail = FALSE, $extra_class = NULL) |
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";
}
Comments
This function has been
PermalinkThis function has been renamed to theme_menu_link() in Drupal 7.
Where is it
PermalinkI have just installed Drupal 7.20, im fairly new to drupal and theming it, I woudl really like to know where I can get the main menu output to be
Adding something changed to
PermalinkWarning: different modules like Special menu items and similar could override menu functions like this one, resulting in ignorance towards template.php altering.
theming menu items element
Permalinkfor D6. how do i theme each item element specifically "
please help...