menu_node_get_parent($item, $return = 'title')Return the parent item of a menu element.
$item The menu item.
$return Indicates the value to return, options are: -- 'title' returns the name of the parent menu item. -- 'item' returns the entire parent, as loaded by menu_get_item().
A string, representing the parent name or a menu object.
./menu_node.module, line 211
<?php
function menu_node_get_parent($item, $return = 'title') {
if ($return == 'title') {
return db_result(db_query("SELECT link_title FROM {menu_links} WHERE mlid = %d", $item['p1']));
}
$path = db_result(db_query("SELECT link_path FROM {menu_links} WHERE mlid = %d", $item['p1']));
return menu_get_item($path);
}
?>