Same name and namespace in other branches
  1. 4.7.x includes/menu.inc \theme_menu_item()
  2. 5.x includes/menu.inc \theme_menu_item()
  3. 6.x includes/menu.inc \theme_menu_item()

Generate the HTML output for a single menu item.

Parameters

$mid: The menu id of the item.

$children: A string containing any rendered child items of this menu.

$leaf: A boolean indicating whether this menu item is a leaf.

Related topics

1 theme call to theme_menu_item()
menu_tree in includes/menu.inc
Returns a rendered menu tree.

File

includes/menu.inc, line 592
API for the Drupal menu system.

Code

function theme_menu_item($mid, $children = '', $leaf = TRUE) {
  return '<li class="' . ($leaf ? 'leaf' : ($children ? 'expanded' : 'collapsed')) . '">' . menu_item_link($mid) . $children . "</li>\n";
}