function ctools_terms_breadcrumb in Chaos Tool Suite (ctools) 6
Same name and namespace in other branches
- 7 plugins/arguments/terms.inc \ctools_terms_breadcrumb()
Inject the breadcrumb trail if necessary.
1 string reference to 'ctools_terms_breadcrumb'
File
- plugins/arguments/ terms.inc, line 62 
- Plugin to provide an argument handler for a Taxonomy term
Code
function ctools_terms_breadcrumb($conf, $context) {
  if (empty($conf['breadcrumb'])) {
    return;
  }
  $current->tid = $context->tids[0];
  $breadcrumb = array();
  while ($parents = taxonomy_get_parents($current->tid)) {
    $current = array_shift($parents);
    $breadcrumb[] = l($current->name, 'taxonomy/term/' . $current->tid);
  }
  $breadcrumb = array_merge(drupal_get_breadcrumb(), array_reverse($breadcrumb));
  drupal_set_breadcrumb($breadcrumb);
}