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) {
$body_classes[] = 'node-type-'. form_clean_id($variables['node']->type);
}
// Add information about the number of sidebars.
if ($variables['left'] && $variables['right']) {
if ($variables['layout'] == 'both') {
$body_classes[] = 'two-sidebars';
}
elseif ($variables['left']) {
$body_classes[] = 'one-sidebar sidebar-left';
}
elseif ($variables['right']) {
$body_classes[] = 'one-sidebar sidebar-right';
elseif ($variables['layout'] == 'none') {
$body_classes[] = 'no-sidebars';
}
else {
$body_classes[] = 'no-sidebars';
$body_classes[] = 'one-sidebar sidebar-'. $variables['layout'];
}
// Implode with spaces.
$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