function taxonomy_breadcrumb_page_alter in Taxonomy Breadcrumb 7
Implements hook_page_alter().
File
- ./
taxonomy_breadcrumb.module, line 113 - 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_page_alter(&$page) {
// Set the breadcrumb on taxonomy term pages.
if (arg(0) == 'taxonomy' && arg(1) == 'term' && is_numeric(arg(2))) {
module_load_include('inc', 'taxonomy_breadcrumb');
$breadcrumb = _taxonomy_breadcrumb_generate_breadcrumb(arg(2), TRUE);
// Add the page title.
if (variable_get('taxonomy_breadcrumb_page_title', FALSE)) {
$term = taxonomy_term_load(arg(2));
$breadcrumb[] = check_plain($term->name);
}
drupal_set_breadcrumb($breadcrumb);
}
}