A brief view of Drupal Themes
For the past year and a half, I’ve been setting up a lot of websites for people based on Drupal. Drupal is an open source content management system written in PHP. The first Drupal based site I ever interacted with was Ecademy. While it is based on Drupal, it is highly customized, based on an early version of Drupal, and my interaction with the site was almost exclusively as a user.
In 2003, I became involved with a group of people working on DeanSpace. The idea of DeanSpace was to provide a powerful platform for volunteers to create great, interlinked, websites promoting Howard Dean’s campaign for President. When the campaign was over, DeanSpace evolved into CivicSpace. DeanSpace and CivicSpace is based on Drupal.
When it comes to computer systems, I’ve always talked about my ‘displaced complexity theory of computer systems’. Computer systems don’t become less complex. The complexity merely gets shifted around. If you are lucky, it gets shifted to places where it is less annoying to end users, but that means that someone else ends up picking up the complexity.
Within Drupal, many people feel that one of the more complex areas is the ‘theme’ system. End users should never have to think about themes. Site administrators need to know enough about themes to be able configure the site to look as close as possible to their goal, and the real complexity needs to be passed off to programmers and theme developers.
As Drupal evolves, and especially as projects like DeanSpace and CivicSpace add a lot to what is being done with Drupal, the theme system changes. Unfortunately, I haven’t found a good easy to understand explanation of themes and how site administrators can get as good a site as possible without having to have special programming or theme development done. This article is intended to remedy, at least in part, this lack. It will, perhaps, over simply aspects of themes, but hopefully it will enable site administrators to have better sites. I will use Drupal vocabulary where I find it useful, but I will avoid it when it doesn’t help with the understanding of the concepts.
At the simplest level, a Drupal site is made up of a collection of entries stored in a database and displayed different ways, depending on the users needs. They are displayed on pages that have a common layout. This layout can be thought of as five key sections, the header, the footer, the right hand column, the left hand column and the body. A site administrator decides what each of these sections looks like, or even if they are displayed, by selecting and configuring themes.
A site administrator can go to Administer, Configuration, Themes to administer the themes of the site. On this page, the different themes that have been installed may be selected. One needs to be selected as the default theme, and some themes may have additional configuration options. It is possible to allow users to select a specific theme for their own use, but generally, this is a level of complication that many sites don’t need.
The configuration of a theme can be as simple as selecting an image to use as a banner in the header, selecting a CSS file to describe aspects of the page, selecting specialized links, or displaying header and footer information. These days, templates, and the ability to modify them online are being added to allow an even greater flexibility.
The other key area of configuring a Drupal website is in selecting the content that will be displayed in the right hand and left hand columns. These columns are made of sections called ‘blocks’. You can select, arrange, and even add new blocks by going to Administer, Configuration, Blocks.
There are many predefined blocks available, depending on how your system is configured. You can chose whether the block goes in the left hand column or right hand column, and the order is it displayed in. Like themes, many blocks have additional configuration options. However, the configuration options for the blocks are normally found as part of the configuration options of the module that creates the block. You can get to these by going to Administer, Configuration, Modules. Also, as you turn on different modules, new blocks may become available to add in the right and left hand columns.
By focusing on the Themes, the blocks, and where necessary, the underlying modules, there is a great amount of flexibility that will meet the needs of many site administrators.
Any additional feedback or questions about how to get Drupal to look the way you want is appreciated.