function _forum_CrumbsPlugin__hierarchy::findParent__forum in Crumbs, the Breadcrumbs suite 6.2
Same name and namespace in other branches
- 6 plugins/crumbs.forum.inc \_forum_CrumbsPlugin__hierarchy::findParent__forum()
Terms get their parent terms as breadcrumb parent. The method name matches the router path "taxonomy/term/%".
File
- plugins/
crumbs.forum.inc, line 26
Class
Code
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>';
}