This tutorial will show you how to add a region to your Node template. That is, how to display, or call, a region in your
node.tpl.php (rather than in your Page template:
page.tpl.php). This might come in handy when for instance you want to display a block somewhere inside your node. I used it once to add a region for blocks at the end of my node content, but before the Comment section (which in the
page.tpl.php is generally included in the main content variable).
Just like adding a new region to your Page template, you will first need to declare a new region in your theme.info file.
Next, you need to edit your
node.tpl.php file (you can find that in your theme folder, possibly in the templates sub-folder). If you have custom node templates for specific Content Types and you want to call a new region in those, edit those (too).
Try to find this .php line:
print render($content); This renders out the content of your node (which includes also additional fields that you added with CCK). You can use this to orient yourself and figure out where you want to display your new region. And the command to call your new region is:
Next, you just add a block to your new region and it should appear where you added it on your node.
Hope this helps.
NB: A good way to later manage your block display in regions is using the Context module.
Danny founded WEBOMELETTE in 2012 as a passion project, mostly writing about Drupal problems he faced day to day, as well as about new technologies and things that he thought other developers would find useful. Now he now manages a team of developers and designers, delivering quality products that make businesses successful.