How to add a region to drupal themes


Download the Zen Theming project
Download the CTI Flex Theme

Zenophile, tool for creating Subthemes of the Zen project, eliminating manual copying and editing.
Drupal version 6.x

Locating the theme
If you want to add a region to the default cti flex / Zen theme go the directory in which you have the cti flex default theme installed.

In my case \sites\all\themes\cti_flex
Editing the files
If you want to add a region you need to edit two files
- page.tpl.php

I want to add a region above the header logo called header top.
edit: page.tpl.php

<div id="header"><div id="header-inner" class="clear-block">

    <?php if ($header_top): ?>
        <div id="header-top">
        <?php print $header_top; ?>
        </div> <!-- /end #header-top -->
    <?php endif; ?>

      <?php if ($secondary_links): ?>
        <div id="secondary">
          <?php print theme('links', $secondary_links); ?>
        </div> <!-- /#secondary -->
      <?php endif; ?>

regions[header]             = header
regions[header_top]     = header top
regions[footer]               = footer
Adding block
If you now go to Administer|Site building|Blocks a new region will appear with the name header top.
Theming the block
 If you want to add some css edit the file cti-fles.css

/** ------------------------------- HEADER -------------------------------- **/

#header-top { height: 20px;}