function context_preprocess_page in Context 6
Same name and namespace in other branches
- 8 context.module \context_preprocess_page()
- 6.3 context.core.inc \context_preprocess_page()
- 6.2 context.core.inc \context_preprocess_page()
- 7.3 context.core.inc \context_preprocess_page()
Implementation of preprocess_page().
1 string reference to 'context_preprocess_page'
- context_theme_registry_alter in ./
context.core.inc - Implementation of hook_theme_registry_alter().
File
- ./
context.core.inc, line 503
Code
function context_preprocess_page(&$vars) {
$info = context_active_values('theme_section');
$vars['section_title'] = !empty($info['title']) ? $info['title'] : '';
$vars['section_subtitle'] = !empty($info['subtitle']) ? $info['subtitle'] : '';
$vars['body_classes'] .= !empty($info['class']) ? ' ' . $info['class'] : '';
// If primary + secondary links are pointed at the same menu, provide
// contextual trailing by default.
if (variable_get('menu_primary_links_source', 'primary-links') == variable_get('menu_secondary_links_source', 'secondary-links')) {
$vars['primary_links'] = context_menu_navigation_links(variable_get('menu_primary_links_source', 'primary-links'));
$vars['secondary_links'] = context_menu_navigation_links(variable_get('menu_secondary_links_source', 'secondary-links'), 1);
}
$vars['primary_links'] = context_menu_set_active($vars['primary_links']);
$vars['secondary_links'] = context_menu_set_active($vars['secondary_links']);
if ($context_links = context_links()) {
$vars['context_links'] = theme('context_links', $context_links);
}
}