Book Image

Drupal 6 Themes

By : Ric Shreves
Book Image

Drupal 6 Themes

By: Ric Shreves

Overview of this book

<p>Drupal is an award winning open source Content Management System (CMS). Based on PHP/MySQL, its power and flexibility combined with its exceptional design mean it is one of the most popular choices for creating a CMS website.<br /><br />Drupal employs a specialized templating system and supports themes, which allow you to change the look and feel of the system's front and back-end interfaces. <br /><br />Drupal 6 Themes is an ideal introduction to theming with Drupal 6. If you want to create a striking new look for your Drupal 6 website, this book is for you. This book is a revised, updated and expanded edition of Drupal 5 Themes, written specifically for Drupal 6. The book will show you techniques and tools to help you improve the look and feel of any Drupal 6-powered website<br /><br />Starting from the basics of theme setup and configuration, you will learn about the Drupal theming architecture and the PHPTemplate engine, and then move on to modifying existing themes and building new themes from scratch. You will find out about tools to make your theme development easier, and also find invaluable information about under-documented elements of the theming system.</p>
Table of Contents (16 chapters)
Drupal 6 Themes
Credits
About the Author
About the Reviewers
Preface

Chapter 3. Working with Theme Engines

In this chapter, we will explore theme engines in general and Drupal's default PHPTemplate theme engine in detail.

Our exploration of the PHPTemplate engine lays an important foundation for understanding how to create themes or how to extensively modify existing themes. In the examples below, we show:

  • The key files used in the theming process

  • How these files impact themes

  • The order of precedence among theme files

  • The availability of alternatives to the PHPTemplate engine

Though you don't need to be fluent in PHP to understand this chapter fully, a little familiarity with the programming language will certainly make things easier. The code examples in this chapter come from the default themes Bluemarine and Garland, contained in the Drupal distribution.

What is PHPTemplate?

PHPTemplate is one of a family of applications known as theme engines (referred to often elsewhere as "template engines"). These applications serve a middleware function and determine the...