Commit e270cd09 authored by Gábor Hojtsy's avatar Gábor Hojtsy

#176084 by Stefan Nantegaal and dvessel: fix notices in theme.inc, when...

#176084 by Stefan Nantegaal and dvessel: fix notices in theme.inc, when specific sidebars are not set
parent 44697397
...@@ -1748,17 +1748,14 @@ function template_preprocess_page(&$variables) { ...@@ -1748,17 +1748,14 @@ function template_preprocess_page(&$variables) {
$body_classes[] = 'node-type-'. form_clean_id($variables['node']->type); $body_classes[] = 'node-type-'. form_clean_id($variables['node']->type);
} }
// Add information about the number of sidebars. // Add information about the number of sidebars.
if ($variables['left'] && $variables['right']) { if ($variables['layout'] == 'both') {
$body_classes[] = 'two-sidebars'; $body_classes[] = 'two-sidebars';
} }
elseif ($variables['left']) { elseif ($variables['layout'] == 'none') {
$body_classes[] = 'one-sidebar sidebar-left'; $body_classes[] = 'no-sidebars';
}
elseif ($variables['right']) {
$body_classes[] = 'one-sidebar sidebar-right';
} }
else { else {
$body_classes[] = 'no-sidebars'; $body_classes[] = 'one-sidebar sidebar-'. $variables['layout'];
} }
// Implode with spaces. // Implode with spaces.
$variables['body_classes'] = implode(' ', $body_classes); $variables['body_classes'] = implode(' ', $body_classes);
......
Markdown is supported
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