function zircon_preprocess_page in Zircon Profile 8
Same name and namespace in other branches
- 8.0 themes/zircon/zircon.theme \zircon_preprocess_page()
File
- themes/
zircon/ zircon.theme, line 10
Code
function zircon_preprocess_page(&$variables) {
if (!empty($variables['page']['sidebar_first']) && !empty($variables['page']['sidebar_second'])) {
$variables['attributes']['class'][] = 'layout-two-sidebars';
$variables['page']['main_content_width'] = 6;
}
elseif (!empty($variables['page']['sidebar_first'])) {
$variables['attributes']['class'][] = 'layout-one-sidebar';
$variables['attributes']['class'][] = 'layout-sidebar-first';
$variables['page']['main_content_width'] = 9;
}
elseif (!empty($variables['page']['sidebar_second'])) {
$variables['attributes']['class'][] = 'layout-one-sidebar';
$variables['attributes']['class'][] = 'layout-sidebar-second';
$variables['page']['main_content_width'] = 9;
}
else {
$variables['attributes']['class'][] = 'layout-no-sidebars';
$variables['page']['main_content_width'] = 12;
}
//$variables['logo'] = str_replace('.svg', '.png', $variables['logo']);
//print_r($variables);
//exit;
}