You are here

function _forum_CrumbsPlugin__term_node::findParent__node__ in Crumbs, the Breadcrumbs suite 6

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

File

plugins/crumbs.forum.inc, line 52

Class

_forum_CrumbsPlugin__term_node

Code

function findParent__node__($path, $item) {
  $node = $item['map'][0];
  if ($node->type == 'forum' && is_array($node->taxonomy)) {
    $result = array();
    foreach ($node->taxonomy as $tid => $term) {
      if ($term->vid == $this->_forum_vid) {
        return 'forum/' . $tid;
      }
    }
  }
}