Round Rock / Austin, Texas
Drupal Web Developer

How to print a Region in node.tpl.php (or another custom tpl.php file) in D7

Error message

Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in drupal_get_feeds() (line 394 of /home/thefoxes/foxwebdevelopment.com/includes/common.inc).

How to print a Region in node.tpl.php (or another custom tpl.php file) in D7

In theme’s .info file:

regions[content_bottom] = Content Bottom

In your theme's template.php file:

//Make our regions availalbe in the node templates function MYTHEMENAME_preprocess_node(&$vars) { if ($blocks = block_get_blocks_by_region('content_bottom')) { $vars['content_bottom'] = $blocks; $vars['content_bottom']['#theme_wrappers'][] = 'region'; $vars['content_bottom']['#region'] = 'node_region'; } }

In node.tpl.php:

print render($content_bottom);
Drupal 7 Print Region