Ric Shreves' book teaches readers how to modify and create themes for Drupal 6. The book takes the reader on a tour of how Drupal is organized, what can be themed and then how to modify and create new themes. Along the way he points out changes from Drupal 5's themes which will be useful for users updating their themes to the new version.
Packt's new book, Drupal 6 Themes, takes the reader though the process of creating themes for Drupal 6. It does this by first giving an overview of how themes work in Drupal, then what exactly can be themed and finally takes the reader though several examples.
What is Drupal?
Essentially Drupal is a very flexible content management system that has been in development since 2001. One of its strengths is allowing users to modify much of its look and behaviour by over-riding default actions. This allows developers to concentrate on what they want to change and leaving the rest as is-- a method that will be familiar to users of some frameworks. Themes in Drupal are a collection of files organized in their own directory controlled by a template engine that processes the files. While the book does touch a fair bit of Drupal's structure, themes only really control the presentation layer, so this is not the book if you want to write your own extensions modules.
How themes work in Drupal
The first two chapters cover what Drupal themes are and how the reader is going to work with them. With any content management system (CMS) there are limits to what can be altered without diving into the core of the application. Having once contracted for a company who had done just this and is now probably stuck with their own custom version of Drupal 5, this is something you want to avoid. At the same time, you don't want a web developer able to pick out your CMS from 20 paces-- not to mention your graphic designer isn't going to be too happy to be told every layout they do will have 3 columns and a blue gradient.
The good news is Drupal has a theming system that lets you put not only layout changes, but functionality changes together into a theme in its own directory, keeping your modifications together in one place and making it easy to distribute it. A bit like some other frameworks, it has a well though-out system where your theme can override certain Drupal defaults, be they style-sheets or functionality, while keeping Drupal's defaults intact for the parts you don't want to modify. By the end of chapter two users are already going to be able to install new themes and made minor changes to them.
Comments
Post new comment