Commit 8ef2a246 authored by Nicholas Thompson's avatar Nicholas Thompson
Browse files

Forum integration improvement

parent be1fd9a2
......@@ -10,8 +10,6 @@
* Implementation of hook_page_title_alter().
*/
function forum_page_title_alter(&$title) {
$menu_item = menu_get_item();
// Check we're on a forum page and if there is a number to confirm it's a
// container or forum (rather than root).
if ( $menu_item = menu_get_item() &&
......@@ -36,11 +34,12 @@ function forum_page_title_pattern_alter(&$pattern, &$types) {
$types['term'] = $forum;
$forum_vid = variable_get('forum_nav_vocabulary', '');
$pattern = variable_get('page_title_vocab_'. $forum_vid, '');
$types['vocabulary'] = taxonomy_vocabulary_load($forum_vid);
}
// Otherwise it's the root - let's grab the root pattern.
elseif ($menu_item['path'] == 'forum') {
$pattern = variable_get('page_title_forum_root_title', '');
$vid = variable_get('forum_nav_vocabulary', 0);
$types['vocabulary'] = taxonomy_vocabulary_load($vid);
$forum_vid = variable_get('forum_nav_vocabulary', 0);
$types['vocabulary'] = taxonomy_vocabulary_load($forum_vid);
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment