summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--omega/preprocess/preprocess-zone.inc81
-rw-r--r--omega/templates/region--branding.tpl.php (renamed from omega/templates/region-------branding.tpl.php)0
2 files changed, 39 insertions, 42 deletions
diff --git a/omega/preprocess/preprocess-zone.inc b/omega/preprocess/preprocess-zone.inc
index e8037a6..5cb7962 100644
--- a/omega/preprocess/preprocess-zone.inc
+++ b/omega/preprocess/preprocess-zone.inc
@@ -47,6 +47,37 @@ $populated = FALSE;
$zone_regions = $zone['#regions'];
$block_debug = omega_theme_get_setting('debug_block_toggle', FALSE);
foreach($zone_regions AS $region => $region_data) {
+
+
+
+
+
+
+
+
+
+ // let's account for a couple special regions
+ switch($region) {
+ case 'branding':
+ //case 'menu':
+ //case 'breadcrumb':
+ $zone['#regions'][$region]['#theme_wrappers']= array('region');
+ $zone['#regions'][$region]['#markup'] = 'CUSTOM';
+ $zone['#regions'][$region]['#region'] = $region;
+ $zone['#regions'][$region]['#theme_hook_suggestions'][] = 'region__' . $region;
+ $zone['#regions'][$region]['#theme_hook_suggestions'][] = 'region';
+ break;
+ }
+
+
+
+
+
+
+
+
+
+
// if we've turned on region debugging, let's create some dummy blocks. :)
if($block_debug) {
global $theme_info;
@@ -79,7 +110,7 @@ foreach($zone_regions AS $region => $region_data) {
$zone['#regions'][$region]['omega_debug_'. $region]['#markup'] = '<div class="region-data">'.$region.'</div>';
}
}
- if(element_children($zone_regions[$region]) || $region == 'branding' || $region == 'breadcrumb' || $block_debug) {
+ if(element_children($zone_regions[$region]) || $region == 'branding' || $region == 'menu' || $region == 'breadcrumb' || $block_debug) {
$populated = TRUE;
}
}
@@ -103,7 +134,9 @@ $zone['populated'] = $populated;
$regions = array();
$region_order = array();
foreach($zone_regions AS $region => $region_data) {
+ $region_width = omega_theme_get_setting('omega_' . $zone['zid'] . '_' . $region . '_region_width');
$region_data = is_array($zone_regions[$region]) ? $zone_regions[$region] : FALSE;
+
$regions[$region] = array(
'data' => $region_data,
'width' => omega_theme_get_setting('omega_' . $zone['zid'] . '_' . $region . '_region_width'),
@@ -157,40 +190,6 @@ if(isset($zone['#omega'])) {
// cycle regions again and assign custom data for later rendering
foreach($zone_regions AS $region => $region_data) {
- /*
- // if we've turned on region debugging, let's create some dummy blocks. :)
- if(omega_theme_get_setting('debug_block_toggle', FALSE)) {
- global $theme_info;
- $excluded_regions = array(
- 'branding',
- 'menu',
- 'location',
- 'user_bar_first',
- 'user_bar_second',
- 'page_top',
- 'page_bottom',
- 'breadcrumb',
- );
- if (!in_array($region, $excluded_regions)) {
- $regions = $theme_info->info['regions'];
- $zone['#regions'][$region]['#theme_wrappers'] = array('region');
- $block = new stdClass();
- $block->delta = $region;
- $block->region = $region;
- $block->module = 'omega_tools';
- $block->subject = $regions[$region];
- $block->weight = -100;
- $zone['#regions'][$region]['omega_debug_'. $region] = array();
-
- $zone['#regions'][$region]['#region'] = $region;
- $zone['#regions'][$region]['#sorted'] = FALSE;
- $zone['#regions'][$region]['omega_debug_'. $region]['#printed'] = FALSE;
- $zone['#regions'][$region]['omega_debug_'. $region]['#theme_wrappers'] = array('block');
- $zone['#regions'][$region]['omega_debug_'. $region]['#block'] = $block;
- $zone['#regions'][$region]['omega_debug_'. $region]['#markup'] = '<div class="region-data">'.$region.'</div>';
- }
- }
- */
if(element_children($zone['#regions'][$region])) {
// pass data along down the chain to the region
$zone['#regions'][$region]['#omega'] = array(
@@ -216,17 +215,15 @@ foreach($zone_regions AS $region => $region_data) {
}
}
-
$vars['enabled'] = $zone['enabled'];
$vars['populated'] = $zone['populated'];
$vars['wrapper'] = $zone['wrapper'];
$vars['zid'] = $zone['zid'];
$vars['theme_hook_suggestions'] = $zone['#theme_hook_suggestions'];
// moving the region data out of $vars['zone'] so that it can be rendered as before in zone.tpl.php
-$vars['regions'] = count($zone['#regions']) == 0 ? array('#printed' => TRUE) : $zone['#regions'];
-if($zone['zid'] == 'user') {
- //krumo($vars);
- //krumo($region_classes);
-}
+$vars['regions'] = $zone['#regions'];
-//krumo($vars); \ No newline at end of file
+
+if($zone['zid'] == 'branding') {
+ //krumo($vars);
+} \ No newline at end of file
diff --git a/omega/templates/region-------branding.tpl.php b/omega/templates/region--branding.tpl.php
index a3230aa..a3230aa 100644
--- a/omega/templates/region-------branding.tpl.php
+++ b/omega/templates/region--branding.tpl.php