NodeOne

Learn Drupal 14d: Regions

by NodeOne

This screencast is a part of the epic learning series "Four weeks of Drupal", chapter "Introduction to theming". You can view the full series at dev.nodeone.se/en/four-weeks-of-drupal.
Please post any comments over there, or we won't see them. Sorry.

This screencast shows how to add new regions to your sub theme (or change the existing ones). This is done in three steps:
1. Add a line regions[REGION_MACHINE_NAME] = REGION HUMAN NAME to your .info file
2. Copy the page.tpl.php file from the base theme to your sub theme
3. Add at some suitable place in page.tpl.php, preferrable wrapped by some HTML markup and maybe an if statement.
If you don't declare any regions at all, nine default regions will be added: page_top, page_bottom, content, header, highlight, help, sidebar_first, sidebar_second and footer. (The 'featured' region is not included – sorry for the miss in the recording!) If you declare any regions, you must declare page_top, page_bottom and content, because Drupal requires these to work properly.
That's it!