class _taxonomy_CrumbsPlugin__hierarchy in Crumbs, the Breadcrumbs suite 6
Same name and namespace in other branches
- 6.2 plugins/crumbs.taxonomy.inc \_taxonomy_CrumbsPlugin__hierarchy
Hierarchy
- class \_taxonomy_CrumbsPlugin
Expanded class hierarchy of _taxonomy_CrumbsPlugin__hierarchy
File
- plugins/
crumbs.taxonomy.inc, line 24
View source
class _taxonomy_CrumbsPlugin__hierarchy extends _taxonomy_CrumbsPlugin {
/**
* Terms get their parent terms as breadcrumb parent.
* The method name matches the router path "taxonomy/term/%".
*/
function findParent__taxonomy_term__($path, $item) {
$terms = $item['fragments'][2];
$terms = taxonomy_terms_parse_string($terms);
if (isset($terms['tids']) && count($terms['tids']) === 1) {
$tid = $terms['tids'][0];
$q = db_query($sql = "\n SELECT h.parent, d.vid\n FROM {term_hierarchy} h\n LEFT JOIN {term_data} d ON (h.tid = d.tid)\n WHERE d.tid = %d\n GROUP BY d.vid\n ", $tid);
$result = array();
while ($row = db_fetch_object($q)) {
if ($row->parent) {
$result['voc_' . $row->vid] = 'taxonomy/term/' . $row->parent;
}
}
return $result;
}
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
_taxonomy_CrumbsPlugin:: |
function | |||
_taxonomy_CrumbsPlugin__hierarchy:: |
function | Terms get their parent terms as breadcrumb parent. The method name matches the router path "taxonomy/term/%". |