summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhimerus2010-10-31 02:09:41 (GMT)
committer himerus2010-10-31 02:09:41 (GMT)
commit2a090770a225bf3683c2e2c06703c2f33b34574a (patch)
treec3e5f8ad7680395bb15713bbfca939f88a711dc3
parent6ab960c7e9dc1ea7ae011eadab84ecad2c4cced0 (diff)
adding zone.tpl.php and using delta_theme as a temporary solution for omega_theme and template suggestions on zone.tpl.php
-rw-r--r--delta.module31
-rw-r--r--theme/zone.tpl.php34
2 files changed, 65 insertions, 0 deletions
diff --git a/delta.module b/delta.module
index 13bb990..f6a0aed 100644
--- a/delta.module
+++ b/delta.module
@@ -1,2 +1,33 @@
<?php
// $Id$
+/**
+ * Implements hook_theme().
+ *
+ * @todo figure out WTF with template suggestions inside omega_theme()
+ *
+ * For now, implementing what is a truly hacky situation IMHO
+ * Creating a theme hook for each zone, as well as for the location of the zone
+ * and finally a default zone tpl
+ *
+ * This was forced to be moved to
+ */
+function delta_theme() {
+ $hooks = array();
+ $variables = array(
+ 'zid' => NULL,
+ 'type' => NULL,
+ 'enabled' => NULL,
+ 'wrapper' => NULL,
+ 'zone_type' => NULL,
+ 'container_width' => NULL,
+ 'regions' => NULL
+ );
+ $template_path = drupal_get_path('module', 'delta') .'/theme';
+ $preprocess_functions = array('template_preprocess', 'template_preprocess_zone');
+ $process_functions = array('template_preprocess', 'template_preprocess_zone');
+ $hooks['zone'] = array(
+ 'variables' => $variables,
+ 'pattern' => 'zone__'
+ );
+ return $hooks;
+} \ No newline at end of file
diff --git a/theme/zone.tpl.php b/theme/zone.tpl.php
new file mode 100644
index 0000000..47ee900
--- /dev/null
+++ b/theme/zone.tpl.php
@@ -0,0 +1,34 @@
+<?php
+// $Id$
+drupal_set_message('zone.tpl.php (delta)');
+/**
+ * @file
+ * Default theme implementation to display a region.
+ *
+ * Available variables:
+ * - $regions: Renderable array of regions associated with this zone
+ * - $enabled: Flag to detect if the zone was enabled/disabled via theme settings
+ * - $wrapper: Flag set to display a full browser width wrapper around the
+ * container zone allowing items/backgrounds to be themed outside the
+ * 960pixel container size.
+ * - $zid: the zone id of the zone being rendered. This is a text value.
+ * - $container_width: the container width (12, 16, 24) of the zone
+ * - $attributes: a string containing the relevant class & id data for a container
+ *
+ * Helper Variables
+ * - $attributes_array: an array of attributes for the container zone
+ *
+ * @see template_preprocess()
+ * @see template_preprocess_zone()
+ * @see template_process()
+ * @see template_process_zone()
+ */
+?>
+
+<?php if($enabled): ?>
+ <?php if($wrapper): ?><div id="<?php print $zid;?>-outer-wrapper"><?php endif; ?>
+ <div <?php print $attributes;?>>
+ <?php print render($regions); ?>
+ </div>
+ <?php if($wrapper): ?></div><?php endif; ?>
+<?php endif; ?> \ No newline at end of file