O'Reilly logo

Drupal 7 Cookbook by Dylan James

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required