From 91843f3d6edbdabc528dbb0c3905a774c4f6984e Mon Sep 17 00:00:00 2001 From: Greg Garvey Date: Wed, 26 Apr 2017 12:05:47 -0700 Subject: [PATCH] added body lower, full width middle and body bottom --- stanford_soe_regions.module | 49 ++++++++++++++++++++++++- templates/digital-magazine-page.tpl.php | 18 +++++++++ 2 files changed, 65 insertions(+), 2 deletions(-) diff --git a/stanford_soe_regions.module b/stanford_soe_regions.module index 3f39864..7ed7644 100644 --- a/stanford_soe_regions.module +++ b/stanford_soe_regions.module @@ -11,10 +11,28 @@ function stanford_soe_regions_define_regions() { $region['full_width_super_hero'] = array( 'title' => 'Full Width Super Hero', - 'js' => drupal_get_path('module', 'stanford_soe_regions') . '/js/stanford_soe_regions.js', - 'css' => drupal_get_path('module', 'stanford_soe_regions') . '/css/stanford_soe_regions.css', + //'js' => drupal_get_path('module', 'stanford_soe_regions') . '/js/stanford_soe_regions.js', + //'css' => drupal_get_path('module', 'stanford_soe_regions') . '/css/stanford_soe_regions.css', 'render_callback' => '_full_width_super_hero_render_region', ); + $region['content_body_lower'] = array( + 'title' => 'Content Body Lower', + //'js' => drupal_get_path('module', 'stanford_soe_regions') . '/js/stanford_soe_regions.js', + //'css' => drupal_get_path('module', 'stanford_soe_regions') . '/css/stanford_soe_regions.css', + 'render_callback' => '_content_body_lower_render_region', + ); + $region['full_width_middle'] = array( + 'title' => 'Full Width Middle', + //'js' => drupal_get_path('module', 'stanford_soe_regions') . '/js/stanford_soe_regions.js', + //'css' => drupal_get_path('module', 'stanford_soe_regions') . '/css/stanford_soe_regions.css', + 'render_callback' => '_full_width_middle_render_region', + ); + $region['content_body_bottom'] = array( + 'title' => 'Content Body Lower', + //'js' => drupal_get_path('module', 'stanford_soe_regions') . '/js/stanford_soe_regions.js', + //'css' => drupal_get_path('module', 'stanford_soe_regions') . '/css/stanford_soe_regions.css', + 'render_callback' => '_content_body_bottom_render_region', + ); return $region; } @@ -27,6 +45,33 @@ function _full_width_super_hero_render_region($block_html, $block) { return $output; } +/** + * Helper function for rendering the blocks in this region + */ +function _content_body_lower_render_region($block_html, $block) { + $renderable_block = _block_get_renderable_array(array($block)); + $output = drupal_render($renderable_block); + return $output; +} + +/** + * Helper function for rendering the blocks in this region + */ +function _full_width_middle_render_region($block_html, $block) { + $renderable_block = _block_get_renderable_array(array($block)); + $output = drupal_render($renderable_block); + return $output; +} + +/** + * Helper function for rendering the blocks in this region + */ +function _content_body_bottom_render_region($block_html, $block) { + $renderable_block = _block_get_renderable_array(array($block)); + $output = drupal_render($renderable_block); + return $output; +} + /** * Implements hook_page_alter(). */ diff --git a/templates/digital-magazine-page.tpl.php b/templates/digital-magazine-page.tpl.php index 3bb0290..9658a97 100644 --- a/templates/digital-magazine-page.tpl.php +++ b/templates/digital-magazine-page.tpl.php @@ -263,6 +263,24 @@ + +
+
+
+ + + +
+
+
+ + + +
+
+
+ +