Chapter 9. The Theme System

Changing the HTML or other markup that Drupal produces requires knowledge of the layers that make up the theme system. In this chapter, I'll teach you how the theme system works and reveal some of the best practices hiding within the Drupal 7 core. Here's the first one: you don't need to (nor should you) edit the HTML within module files to change the look and feel of your site. By doing that, you've just created your own proprietary content management system and have thus lost one of the biggest advantages of using a community-supported open source software system to begin with. Override, don't change!

Themes

In Drupal-speak, themes are a collection of files that make up the look and feel of your site. You can download ...

Get Pro Drupal 7 Development, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.