You are here

function nodehierarchy_get_breadcrumb in Node Hierarchy 7.4

Get the breadcrumbs for the given node.

There could be multiple breadcrumbs because there could be multiple parents.

1 call to nodehierarchy_get_breadcrumb()
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 289

Code

function nodehierarchy_get_breadcrumb($nid) {
  $breadcrumb = array();

  // Retrieve the descendent list of menu links and convert them to a breadcrumb trail.
  $trail = nodehierarchy_get_node_primary_ancestor_nodes($nid);
  foreach ($trail as $node) {
    $uri = entity_uri('node', $node);
    $breadcrumb[] = l($node->title, $uri['path'], $uri['options']);
  }
  return $breadcrumb;
}