Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hello and firstly great Thanks for Tweme!
I can't add a region into node.tpl.php in tweme:
- In tweme.info:
regions[content_below] = Below node
- In template.php:
function _tweme_preprocess_node(&$vars) { if ($blocks = block_get_blocks_by_region('content_below')) { $vars['content_below'] = $blocks; $vars['content_below'] = $blocks; $vars['content_below']['#theme_wrappers'] = array('region'); $vars['content_below']['#region'] = 'content_below'; } }
- In node.tpl.php:
<?php print render($content_below); ?>
(after such code:<?php // We hide the comments and links now so that we can render them later. hide($content['comments']); hide($content['links']); print render($content); ?>
So no errors, but also no region on any node page.
I tried adding
<?php print render($page['content_below']); ?>
and
<?php print render($content['content_below']); ?>
It works in two other themes.
Comments
Comment #1
kaztur CreditAttribution: kaztur commentedSolved!
I made the same changes in files inside Bootstrap theme