Create Regions in Drupal Themes

July 16, 2007 by hejian

1. Edit the template.php file:

// creating custom regions
function xxx_regions() {
return array(
'left' => t('left sidebar'),
'right' => t('right sidebar'),
'content' => t('content'),
'header' => t('header'),
'footer' => t('footer')
);
}

(replace the xxx to your template name)

2. Place the regions in page.tpl.php:

<div id="header_region"><?php print $header ?></div>

(replace the header to your region name)

Leave a Reply

You must be logged in to post a comment.

Wordpress template made by HeJian