Adding a new block region to a theme

A Drupal theme defines the structure of the HTML that is output to the screen. It also defines several regions in the HTML structure where blocks can be output, such as Header, Footer, Sidebar first, and so on. This recipe describes how to add your own custom regions to a theme, for situations where the predefined ones do not provide enough flexibility to display your content.

Getting ready

For this recipe, you will need:

  • FTP access to your site and a FTP client such as FileZilla
  • A suitable code editor such as Notepad ++

How to do it...

In this recipe, we will be creating a subtheme based on the Bartik theme, to which we will add the new region. We will be working with a subtheme to avoid updating the Bartik theme ...

Get Drupal 7 Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.