menu_node_get_nodes_by_menu($menu_name, $load = FALSE)Get all nodes assigned to a specific menu.
$menu_name The machine name of the menu, e.g. 'navigation'.
$load Boolean flag that indicates whether to load the node object or not. NOTE: This can be resource intensive!
A simple array of node ids.
./menu_node.module, line 109
<?php
function menu_node_get_nodes_by_menu($menu_name, $load = FALSE) {
$links = array();
$result = db_query("SELECT mn.nid FROM {menu_node} mn INNER JOIN {menu_links} ml ON mn.mlid = ml.mlid WHERE ml.menu_name = '%s'", $menu_name);
while ($data = db_fetch_object($result)) {
if ($load) {
$nodes[$data->nid] = node_load($data->nid);
}
else {
$nodes[] = $data->nid;
}
}
return $nodes;
}
?>