function forum_page_title_pattern_alter in Page Title 6.2
Same name and namespace in other branches
- 8.2 modules/forum.page_title.inc \forum_page_title_pattern_alter()
- 7.2 modules/forum.page_title.inc \forum_page_title_pattern_alter()
Implementation of hook_page_title_pattern_alter().
File
- modules/
forum.page_title.inc, line 29 - Forum implementations of the page title hooks
Code
function forum_page_title_pattern_alter(&$pattern, &$types) {
$menu_item = menu_get_item();
// Forums Page title Patterns
if (!strncmp($menu_item['path'], 'forum/%', 7) && ($term = taxonomy_get_term($menu_item['page_arguments'][0]))) {
$types['taxonomy'] = $term;
$forum_vid = variable_get('forum_nav_vocabulary', '');
$pattern = variable_get('page_title_vocab_' . $forum_vid, '');
}
elseif ($menu_item['path'] == 'forum') {
$pattern = variable_get('page_title_forum_root_title', '');
}
}