You are here

function _taxonomy_CrumbsPlugin__term_node::findParent__node_x in Crumbs, the Breadcrumbs suite 6.2

Nodes get their terms as breadcrumb parents. The method name matches the router path "node/%".

File

plugins/crumbs.taxonomy.inc, line 68

Class

_taxonomy_CrumbsPlugin__term_node

Code

function findParent__node_x($path, $item) {
  $node = $item['map'][0];
  if (is_array($node->taxonomy)) {
    $result = array();
    foreach ($node->taxonomy as $tid => $term) {
      if (!isset($result['voc_' . $term->vid])) {
        $result['voc_' . $term->vid] = "taxonomy/term/{$tid}";
      }
    }
    return $result;
  }
}