Drupal set for us many body classes. so we dont need to define them again:
I suggest we only add the with-sidbar... body classes intead of rebuild the whole $vars['body_classes']
I tested this code and got all the body classes as with the former version.
here is my suggestion:
function phptemplate_preprocess_page(&$vars) { // Build array of helpful body classes
$body_classes = array();
if ($vars['left']) {
$body_classes[] = 'with-sidebar-left';
}
if ($vars['right']) {
$body_classes[] = 'with-sidebar-right';
}
$body_classes = array_filter($body_classes); // Remove empty elements
$body_classes = implode(' ', $body_classes);// Create class list separated by spaces
$vars['body_classes'] = $vars['body_classes'] . $body_classes; //add tendu body classes to drupal default body classes
}
Comments
Comment #1
tombigel commentedI know.
But I'm keeping that way because Tendu is intended for developers, and developers want to see the big picture, not just the patches.
Look at 6.x-2.x dev snapshot, I do the same with preprocess_block, and i mention it in the comments.
Comment #2
tombigel commented