Part 1 of an 11-part review of Ric Shreve’s Drupal 6 Themes.
Drupal 6 Themes – The Elements of a Drupal Theme
If I were to describe chapter 1 with one word I would say “Out-of-order”. Ok, that’s technically 3 words, but the point I’m trying to make is that it was a weak introduction to this book. “Brian, how would you have improved this chapter?” I’m glad you asked.
Let me start by saying there was a lack of an introduction. Granted, there was a preface, but it was the standard boilerplate preface that you find in the beginning of every Packt book. Without an adequate introduction, it feels like one is jumping head first into an ice-cold swimming pool without first dipping a toe to get used to the temperature! I think it would have been a good idea to encourage the reader first and then take a few pages to introduce some of the basics of the Drupal CMS. This would ensure that everyone, even those new to Drupal, will establish a solid reference point.
To make things worse, the first few pages of chapter one jump immediately into some theming concepts as if I had prior knowledge of Drupal theming! Then, somewhere in the middle of the chapter, he decides to define the basic terminology with sections such as, “What is a Theme?” Perhaps this chapter got mangled in the editing process, who knows.
If I were to strictly rearrange the existing sections, and not rewrite any of the content, I would put them in this order:
- What Is a Theme? (p. 12)
- The Range and Flexibility of Drupal Themes (p. 13)
- What you see on the Screen (p. 15)
- The Big Picture: How Drupal Displays a Page (p. 18 )
- The Importance of Themes in Drupal (p. 7)
- Theme It in Whole or in Part (p. 8 )
- Build with Blocks (p. 10)
- Intercept and Override (p. 11)
- The Default Themes of the Drupal Distro (p. 20)
- What Is a Theme Engine? (p. 13)
- The Theme Files (p. 24)
- The Files of a PHPTemplate Theme (p. 26)
- The Files of a Pure PHP Theme (p. 28)
- Summary (p. 29)
OK, now that I’ve got THAT off my chest, let me get into the things that I liked about chapter one:
- He does a good job defining terms.
- I like how Ric imparts his wisdom and experience in the form of best practices.
- His screenshots and illustrations are easy to understand.
In my own words, here are some best practices or nuggets of information that I can really appreciate from this chapter:
- Customize your themes at the highest possible level through intercepting and overriding. Do not alter the core!
- Unless you have a really good reason for not using the default PHPTemplate theme engine, you’re better off using the default.
- It is possible to design a theme so entire regions will collapse from sight if no blocks are inserted.
- Unless you have a really good reason for designing a table-based theme, you will be better off using CSS for all of your region positions because you gain a tremendous amount of flexibility.
- You should put your themes in the /sites/all/themes directory to ensure that they are not in the same directory as other core files.
- It is a good idea to create a screenshot.png for any custom built themes to help a site administrator preview your theme.
Chapter 1 Grade Card:
Content Usefulness: A-
Content Organization: D+
Spelling & Grammar: A+
Hands-on Practice: N/A
Code Examples: N/A
Overall: B
Next up, Theme Setup and Configuration.


