function phptemplate_body_class in Drupal 5
Same name and namespace in other branches
- 6 themes/garland/template.php \phptemplate_body_class()
Sets the body-tag class attribute.
Adds 'sidebar-left', 'sidebar-right' or 'sidebars' classes as needed.
1 call to phptemplate_body_class()
- page.tpl.php in themes/
garland/ page.tpl.php
File
- themes/
garland/ template.php, line 8
Code
function phptemplate_body_class($sidebar_left, $sidebar_right) {
if ($sidebar_left != '' && $sidebar_right != '') {
$class = 'sidebars';
}
else {
if ($sidebar_left != '') {
$class = 'sidebar-left';
}
if ($sidebar_right != '') {
$class = 'sidebar-right';
}
}
if (isset($class)) {
print ' class="' . $class . '"';
}
}