summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.txt1
-rw-r--r--zen/block.tpl.php5
-rw-r--r--zen/template.php14
3 files changed, 12 insertions, 8 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 078bfe5..2586516 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -1,4 +1,5 @@
Zen 6.x-1.x-dev
+ * Changed $block_classes to $classes and $comment_classes to $classes.
* Don't display comment wrapper when no comments and don't display wrapper title on forums.
#299397: Synchronize Zen's tpl files with core's tpl files
#281106 by kmonty: Erroneous whitespace when div.clear-block touches bottom edge of viewport
diff --git a/zen/block.tpl.php b/zen/block.tpl.php
index abb4891..a84d5fe 100644
--- a/zen/block.tpl.php
+++ b/zen/block.tpl.php
@@ -12,6 +12,9 @@
* - $block->module: Module that generated the block.
* - $block->delta: This is a numeric id connected to each module.
* - $block->region: The block region embedding the current block.
+ * - $classes: A set of CSS classes for the DIV wrapping the block.
+ Possible values are: block-MODULE, region-odd, region-even, odd, even,
+ region-count-X, and count-X.
*
* Helper variables:
* - $block_zebra: Outputs 'odd' and 'even' dependent on each block region.
@@ -26,7 +29,7 @@
* @see template_preprocess_block()
*/
?>
-<div id="block-<?php print $block->module . '-' . $block->delta; ?>" class="block <?php print $block_classes; ?>"><div class="block-inner">
+<div id="block-<?php print $block->module . '-' . $block->delta; ?>" class="<?php print $classes; ?>"><div class="block-inner">
<?php if ($block->subject): ?>
<h2 class="title"><?php print $block->subject; ?></h2>
diff --git a/zen/template.php b/zen/template.php
index 372fbbe..e6e857d 100644
--- a/zen/template.php
+++ b/zen/template.php
@@ -221,13 +221,13 @@ function zen_preprocess_block(&$vars, $hook) {
$block = $vars['block'];
// Special classes for blocks.
- $block_classes = array();
- $block_classes[] = 'block-' . $block->module;
- $block_classes[] = 'region-' . $vars['block_zebra'];
- $block_classes[] = $vars['zebra'];
- $block_classes[] = 'region-count-' . $vars['block_id'];
- $block_classes[] = 'count-' . $vars['id'];
- $vars['block_classes'] = implode(' ', $block_classes);
+ $classes = array('block');
+ $classes[] = 'block-' . $block->module;
+ $classes[] = 'region-' . $vars['block_zebra'];
+ $classes[] = $vars['zebra'];
+ $classes[] = 'region-count-' . $vars['block_id'];
+ $classes[] = 'count-' . $vars['id'];
+ $vars['classes'] = implode(' ', $classes);
$vars['edit_links_array'] = array();
$vars['edit_links'] = '';