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 5

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 5: Intercepts and Overrides

In this chapter, we dive into the most powerful technique for customizing the output of a Drupal site—the use of intercepts and overrides. The logical consistency of the Drupal architecture lays the foundation for the approaches discussed in this chapter. Through the application of simple naming conventions, you can intercept and override the system's default templates. By creating your own templates and naming them properly, it is a relatively easy matter to gain control over the output of the Drupal site. The techniques discussed in this chapter enable you to change the way pages appear, and dictate different templates for different types of content, or even different users.

Chapter 5: Intercepts and Overrides

  • Overriding the Default CSS
    • CSS Overrides in Action
  • Overriding Functions
    • Where to Place Overrides
    • How to Name Your Overrides
    • Overrides in Action: How Garland Works
      • Intercepting PHPTemplate Files
      • Overriding Themeable Functions in Garland
    • Various Approaches to Overrides
      • Intercepting and Substituting Files
      • Placing Overrides in the Theme's template.php File
      • Modifying the PHPTemplate Engine Files
      • Placing Overrides in Dedicated Files
  • Intercepting Template Files
  • 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