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.
Intercepts and overrides can be applied to two different but closely intertwined concepts: Drupal's Cascading Style Sheets (CSS) and themeable functions. This chapter discusses each separately, but the underlying principles that empower the use of intercepts and overrides are exactly...