function nodehierarchy_get_breadcrumbs in Node Hierarchy 6.2
Same name and namespace in other branches
- 6.3 nodehierarchy.module \nodehierarchy_get_breadcrumbs()
- 7.2 nodehierarchy.module \nodehierarchy_get_breadcrumbs()
Get the breadcrumbs for the given node.
There could be multiple breadcrumbs because there could be multiple parents.
1 call to nodehierarchy_get_breadcrumbs()
- nodehierarchy_set_breadcrumbs in ./
nodehierarchy.module - Set the breadcrumbs and active menu to reflect the position of the given node in the site hierarchy.
File
- ./
nodehierarchy.module, line 1378 - A module to make nodes hierarchical.
Code
function nodehierarchy_get_breadcrumbs($nid) {
$breadcrumbs = array();
// Retrieve the descendent list of menu links and convert them to a breadcrumb trail.
$menu_link_trails = _nodehierarchy_get_node_ancestor_menu_links($nid);
foreach ($menu_link_trails as $menu_links) {
$breadcrumb = array();
foreach ($menu_links as $menu_link) {
$breadcrumb[] = l($menu_link['link_title'], $menu_link['link_path']);
}
$breadcrumbs[] = $breadcrumb;
}
return $breadcrumbs;
}