function menu_node_get_links_by_menu in Menu Node API 6
Same name and namespace in other branches
- 7 menu_node.module \menu_node_get_links_by_menu()
Get all menu links assigned to a specific menu.
Parameters
$menu_name: The machine name of the menu, e.g. 'navigation'.
Return value
A simple array of menu link ids.
1 call to menu_node_get_links_by_menu()
- menu_node_delete_menu_form_submit in ./
menu_node.module - Custom form handler to react to custom menu changes.
File
- ./
menu_node.module, line 96 - Menu Node API Manages relationships between the {node} and {menu_links} table.
Code
function menu_node_get_links_by_menu($menu_name) {
$links = array();
$result = db_query("SELECT mlid FROM {menu_links} WHERE menu_name = '%s'", $menu_name);
while ($data = db_fetch_object($result)) {
$links[] = $data->mlid;
}
return $links;
}