function _nodehierarchy_create_node_menu_link in Node Hierarchy 6.2
Same name and namespace in other branches
- 6.3 nodehierarchy.module \_nodehierarchy_create_node_menu_link()
- 7.2 nodehierarchy.module \_nodehierarchy_create_node_menu_link()
Get the menu link for the given node.
1 call to _nodehierarchy_create_node_menu_link()
- _nodehierarchy_get_node_mlid in ./
nodehierarchy.module - Get the primary menu link id for the given node. Optionally create one if needed.
File
- ./
nodehierarchy.module, line 1335 - A module to make nodes hierarchical.
Code
function _nodehierarchy_create_node_menu_link($nid) {
$node = node_load($nid);
$menu_link = _nodehierarchy_default_menu_link($node->nid);
$menu_link['link_title'] = $node->title;
_nodehierarchy_save_menu_link($menu_link);
return $menu_link;
}