menu_node_get_links($nid, $router = FALSE)Get the relevant menu links for a node.
$nid The node id.
$router Boolean flag indicating whether to attach the menu router item to the $item object. If set to TRUE, the router will be set as $item->menu_router.
An array of complete menu_link objects or an empy array on failure.
./menu_node.module, line 69
<?php
function menu_node_get_links($nid, $router = FALSE) {
$result = db_query("SELECT * FROM {menu_links} WHERE link_path = '%s'", 'node/'. $nid);
$items = array();
while ($data = db_fetch_object($result)) {
if ($router) {
$data->menu_router = menu_get_item('node/'. $nid);
}
$items[$data->mlid] = $data;
}
return $items;
}
?>