menu_get_root_menus()
drupal-5/includes/menu.inc, line 295
Retrieves the menu ID and title of all root menus.
Array containing all menus (but not menu items), in the form mid => title.
| Name | Description |
|---|---|
| Menu system | Define the navigation menus, and route page requests to code based on URLs. |
<?php
function menu_get_root_menus() {
$menu = menu_get_menu();
$root_menus = array();
foreach ($menu['items'][0]['children'] as $mid) {
$root_menus[$mid] = $menu['items'][$mid]['title'];
}
return $root_menus;
}
?>