How to Build New Regions
Regions are where the certain blocks will display information on your Drupal website. Sometimes a Drupal theme will not have all the regions you may require built into the template already, so you will have to take the time to create some regions of your own. This tutorial will guide you through the process of creating a new Drupal region.
In order to do this, you will need to edit your theme's template.php file. Add in the code for the basic regions of a typical theme: left, right, content, header, and footer. In the following example, you will replace the "mytheme" section to the actual name of your them (fourseasons_regions).
< ?php
function mytheme_regions() {
return array(
'right' => t('right sidebar'),
'content' => t('content'),
'header' => t('header'),
'footer' => t('footer'),
'floater' => t('floater'),
);
}
?>
Now to add your custom region, first give it a name and add a line of code to the above section. We will create an example region to the above section, making sure there are no spaces or hyphens in the name for the first part. Note: You can use an underscore
'example_1' => t('example 1'),
After that is placed in the template.php file, it will also have to be defined in the page.tpl.php for Drupal to know where the new region should be displayed. Choose a location on your page file and then insert the following code in order to call the function:
< ?php print $example_1;?>
At this point, you can navigate to Administer > Blocks and see that this region is now an option in the drop-down menu. However, in order to get the region to display properly, it may require further tweaking of the CSS file. Create a new division for the display of your new region for a fully customised look.
Get started now! Digital Pacific is an Australian drupal web hosting and domain names provider offering everything you need to run Drupal including support, a mysql database. They can install the drupal cms for a small fee should you require help with installation.