Drupal 5 Themes: Create a new theme for your Drupal website with a clean layout and powerful CSS styling
www.PACKTPUB.com  FREE ONLINE EDITION: Read full chapters online, download free samples from the book and more...
Book Contents Index > Chapter 3

Preface

1: The Elements of a Drupal Theme
2: Theme Set Up and Configuration
3: Working with Theme Engines Free Chapter
4: Style Sheets and Themeable Functions
5: Intercepts and Overrides
6: Modifying an Existing Theme
7: Building a New Theme
8:
Dealing with Forms

Appendix A


Index

Free Chapter:
Chapter 3: Working with Theme Engines [2.1 MB]

Contact us

Chapter 3: Working with Theme Engines

In this chapter, we will explore theme engines in general and the 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 process, and how they impact themes. We also discuss the order of precedence among theme files, and how this principle allows us to override the default template files inside individual themes.

We will also discuss 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 Drupal core and the additional themes Gagarin (installed in Chapter 2) and Zen.

Download this chapter as a PDF file for free
Working with Theme Engines

Chapter 3: Working with Theme Engines

  • What is PHPTemplate?
  • How does it Work?
  • Getting Started with PHPTemplate
    • A Look at the Theme Engine Files
  • A Look at the Key PHPTemplate File Contained in the Theme
    • Two Contrasting Examples
      • A Basic PHPTemplate Theme—Gagarin
      • A More Complex PHPTemplate Theme—Garland
  • Alternative Theme Engines
    • PHPTAL
    • Smarty
    • PHP XTemplate
  • Installing Additional Theme engines
  • Summary

 

   

 

Paperback 250 pages
Released: December 2007
ISBN: 1847191827
ISBN 13:
978-1-847191-82-3

     

 




View the book details
on PacktPub.com

 


 
  This website is owned and maintained by Packt Publishing Ltd, 2008. All rights reserved. Terms and Conditions