You are here

class _forum_CrumbsPlugin__hierarchy in Crumbs, the Breadcrumbs suite 6.2

Same name and namespace in other branches
  1. 6 plugins/crumbs.forum.inc \_forum_CrumbsPlugin__hierarchy

Hierarchy

Expanded class hierarchy of _forum_CrumbsPlugin__hierarchy

File

plugins/crumbs.forum.inc, line 20

View source
class _forum_CrumbsPlugin__hierarchy {

  /**
   * Terms get their parent terms as breadcrumb parent.
   * The method name matches the router path "taxonomy/term/%".
   */
  function findParent__forum($path, $item) {
    if (preg_match('#^forum/(\\d+)$#', $path, $m)) {
      list(, $tid) = $m;
      $q = db_query($sql = "SELECT parent FROM {term_hierarchy} WHERE tid = %d", $tid);
      while ($row = db_fetch_object($q)) {
        if ($row->parent) {
          return 'forum/' . $row->parent;
        }
      }
      return 'forum';
    }
    return '<front>';
  }

}

Members

Namesort descending Modifiers Type Description Overrides
_forum_CrumbsPlugin__hierarchy::findParent__forum function Terms get their parent terms as breadcrumb parent. The method name matches the router path "taxonomy/term/%".