In Drupal regions are just areas in themes where blocks need be placed. You can assign blocks to regions and organize them within the Drupal administrative interface at Administer ➤ Site building ➤ Blocks.
The default regions used in themes are left sidebar, right sidebar, header, and footer,
although you can create as many regions as you want. Once declared, they’re made available to your page template files (for example, page.tpl.php) as a variable.
For instance, use <?php print $header ?> for the placement of the header region. You create additional regions by creating a function named name-of-your-theme_regions() within your template.php file.
/*
* Declare the available regions implemented by this engine.
*
* @return
* An array of regions. Each array element takes the format:
* variable_name => t('human readable name')
*/
function mytheme_regions() {
return array(
'left' => t('left sidebar'),
'right' => t('right sidebar'),
'content_top' => t('content top'),
'content_bottom' => t('content bottom'),
'header' => t('header'),
'footer' => t('footer')
);
}
To print out the content top region in your page template, use <?php print $content_top ?>.
- Techdipu's blog
- 1248 reads













First time here and seems that i am at right place now. I have many question regarding drupal. I would like to visit here very often.
In Drupal regions are just areas in themes where blocks need be placed. You can assign blocks to regions and organize them within the Drupal administrative interface at Administer ➤ Site building ➤ Blocks.
Post new comment