summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohnAlbin2010-09-13 15:08:42 (GMT)
committer JohnAlbin2010-09-13 15:08:42 (GMT)
commit54b7770153113c4adce43226db29a56da9bff22e (patch)
tree5c500b99b30fa6d8d30c4df96a2791edf52b3e56
parent222d67e86e94227db3874e17e06d063439172470 (diff)
Convert region template suggestions into theme hook suggestions.
-rw-r--r--CHANGELOG.txt4
-rw-r--r--template.php8
-rw-r--r--zen-internals/template.theme-registry.inc2
3 files changed, 12 insertions, 2 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 6f78df7..6bbbf7a 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 d3744ff..ee3afbf 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 ccc6777..95d8e01 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