Chapter 7. Building a New Theme
This chapter takes us into the world of building Drupal themes from scratch. While many people may begin their theme project by copying and modifying an existing theme, in this chapter, we cater to the purists who want to do it all themselves.
Inside we'll cover the basics of creating a new theme employing the PHPTemplate engine, and step through the various tasks required to produce a fully functional theme. In the last half of the chapter, we cover some of the more advanced techniques, including working with theme variables, employing multiple templates, and dynamic theming.
We close this chapter with a brief look at creating a pure PHP template, that is, theming Drupal without the use of a theme engine.
To follow fully the examples in this chapter, you will need your favorite web editor (Dreamweaver or another similar program) and, preferably, access to a development server on which to preview your work. In the section dealing with pure PHP themes, we will...