theme_menu_item

Versions
5
theme_menu_item($mid, $children = '', $leaf = TRUE)
6
theme_menu_item($link, $has_children, $menu = '', $in_active_trail = FALSE, $extra_class = NULL)

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

Code

drupal/includes/menu.inc, line 685

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

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.