diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 6f78df72cde3d0cd6142e1765a3dbe5645418c14..6bbbf7af9ea263b183e99f0e30aeb0208e3fd3ce 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,5 +1,9 @@ // $Id$ +Zen 6.x-2.x-dev, xxxx-xx-xx +----------------------- +- Convert region template suggestions into theme hook suggestions + Zen 6.x-2.0, 2010-06-26 ----------------------- - #791056 by meatsack and JohnAlbin: Zen clobbers Views 3 classes diff --git a/template.php b/template.php index d3744ff08bd9b9f5d4386258ff31c83b05ac8214..ee3afbfda5e5c059261161332cc2e2b10c8f1296 100644 --- a/template.php +++ b/template.php @@ -248,7 +248,13 @@ function zen_blocks($region, $show_blocks = NULL) { $elements['#children'] = $output; $elements['#region'] = $region; - return $output ? theme('region', $elements) : ''; + // Set the theme hook suggestions. + $hook = array('region_' . $region); + if (strpos($region, 'sidebar_') === 0) { + $hook[] = 'region_sidebar'; + } + $hook[] = 'region'; + return $output ? theme($hook, $elements) : ''; } } diff --git a/zen-internals/template.theme-registry.inc b/zen-internals/template.theme-registry.inc index ccc6777fab49dbc725840a9160f851f30e7c2eab..95d8e01776683369ba8582e4aeb3ba949763f1da 100644 --- a/zen-internals/template.theme-registry.inc +++ b/zen-internals/template.theme-registry.inc @@ -76,7 +76,7 @@ function _zen_theme(&$existing, $type, $theme, $path) { return array( 'region' => array( 'arguments' => array('elements' => NULL), - //'pattern' => 'region_', + 'pattern' => 'region_', 'path' => drupal_get_path('theme', 'zen') . '/templates', 'template' => 'region', // We manually register the preprocess and process functions, since