Seven steps to black belt in theming Drupal 6
This guide is a translation and updating of a Swedish equivalent, which in turn was heavily inspired by the book Drupal 6 Themes written by Ric Shreves. I recommend anyone interested in a deeper dive into Drupal theming to read that book.
A few words about Drupal
Drupal is a powerful system to quickly build websites with quite advanced functionality – which should become apparent for anyone installing Drupal and trying some of its more popular modules. It is not as obvious that Drupal also offers great possibilitites to change the look and feel of your website.
To customise Drupal's look and feel is called theming Drupal, and the parts of Drupal handing this are called Drupal's theme layer. This guide will give you a walkthrough of large parts of how the theme layer works for the so-called PHP engine – a theme framework that helps finding and interpreting functions and files for the theme layer. PHP engine is the de facto standard in Drupal theming (and included in core), but is not the only available theme engine.
The guide is divided into several steps, starting with the basics and ending with things that might not be super advanced, but still will let you do most things when it comes to adjusting Drupal's presentation. (As a matter of fact, the first four steps does not strictly deal with theming, but things you should know about when you theme.)
The outline of this guide
- White belt: Principles and philosophy
- Yellow belt: What you can do with configuration
- Orange belt: Downloading and installing themes
- Blue belt: page.tpl.php and regions
- Brown belt: Other template files
- Black belt: template.php and theme functions
- Bonus belt: Theming forms