Email - info@zymphonies.com

Add new regions in Drupal 7 themes

Drupal theme regions are specific areas defined in a theme into which we place blocks. We can create several regions based on our layout requirements. You can define the regions in the theme's info file.

Add new regions in Drupal 7 themes

Define the custom region in your theme's .info file

The .info file for your Drupal 7 theme will be located within the root of the theme's main folder. e.g. MD Minimal's .info theme file is located at: /themes/md_minimal/md_minimal.info

Open up your theme's .info file and you should see some regions like this:

 regions[highlight] = Highlight 
 regions[help] = Help 
 regions[content] = Content

to add a new region just type in a new one in md_minimal.info file.

 regions[footer_icons] = Footer icons

Print out your new region in page.tpl.php file:

<?php if ($page['footer_icons']): ?>
  <div class="footer-icons">
    <?php print render($page['footer_icons']); ?> 
  </div>
  <!-- /.footer icons -->
<?php endif; ?>

Save file, clear your cache (go to admin/config/development/performance) and you will see the new region.