You are here

function taxonomy_breadcrumb_term_page in Taxonomy Breadcrumb 5

This function overrides the core taxonomy_term_page. First, call the core taxonomy_term_page. Then, alter the breadcrumb trail. This module's hook_menu and a module weight greater than taxonomy's ensure this function gets called for the taxonomy/term path (the module weight is in the system table and is set in taxonomy_breadcrumb.install).

1 string reference to 'taxonomy_breadcrumb_term_page'
taxonomy_breadcrumb_menu in ./taxonomy_breadcrumb.module
Implementation of hook_menu().

File

./taxonomy_breadcrumb.module, line 245
The taxonomy_breadcrumb module generates taxonomy based breadcrumbs on node pages and taxonomy/term pages. The breadcrumb trail takes on the form: [HOME] >> [VOCABULARY] >> TERM >> [TERM] ...

Code

function taxonomy_breadcrumb_term_page($str_tids = '', $depth = 0, $op = 'page') {

  // Call the core taxonomy_term_page function
  $output = taxonomy_term_page($str_tids, $depth, $op);

  // Use first term to generate breadcrumb trail
  $terms = taxonomy_terms_parse_string($str_tids);
  $breadcrumb = taxonomy_breadcrumb_generate_breadcrumb($terms['tids'][0], TRUE);
  drupal_set_breadcrumb($breadcrumb);
  return $output;
}