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.
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 ++
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 directly, as it's not advisable to update any files from the core Drupal files, to prevent problems with overwriting when Drupal is updated.
1. Working locally, create a folder called
bartik_extra
.2. In your
bartik_extra
folder, create a new file...