function uc_catalog_page_title_alter in Page Title 6.2
Same name and namespace in other branches
- 8.2 modules/uc_catalog.page_title.inc \uc_catalog_page_title_alter()
- 7.2 modules/uc_catalog.page_title.inc \uc_catalog_page_title_alter()
Implementation of hook_page_title_alter().
File
- modules/
uc_catalog.page_title.inc, line 20 - Ubercart Catalog implementations of the page title hooks
Code
function uc_catalog_page_title_alter(&$title) {
$menu_item = menu_get_item();
// If we're looking at a UC Catalog term page, get the term title
if (!strncmp($menu_item['path'], 'catalog', 7) && isset($menu_item['page_arguments'][1]) && ($term = taxonomy_get_term($menu_item['page_arguments'][1])) && variable_get('page_title_vocab_' . $term->vid . '_showfield', 0) && ($term_title = page_title_load_title($term->tid, 'term'))) {
$title = $term_title;
}
}