menu_item_link

Versions
4.6 – 4.7
menu_item_link($mid)
5
menu_item_link($mid, $theme = TRUE)

Returns the rendered link to a menu item.

Parameters

$mid The menu item id to render.

Related topics

▾ 3 functions call menu_item_link()

menu_get_active_breadcrumb in includes/menu.inc
Returns an array of rendered menu items in the active breadcrumb trail.
theme_menu_item in includes/menu.inc
Generate the HTML output for a single menu item.
theme_menu_local_task in includes/menu.inc
Generate the HTML representing a given menu item ID as a tab.

Code

includes/menu.inc, line 616

<?php
function menu_item_link($mid) {
  $menu = menu_get_menu();

  $link_mid = $mid;
  while ($menu['items'][$link_mid]['type'] & MENU_LINKS_TO_PARENT) {
    $link_mid = $menu['items'][$link_mid]['pid'];
  }

  return theme('menu_item_link', $menu['items'][$mid], $menu['items'][$link_mid]);
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.