Chapter 11. Theming Your Site

The rest of this book has extensively discussed how to construct a diverse array of websites from photo sharing to product reviews to event management by combining powerful Drupal core features and dozens of add-on contributed modules. Drupal gives you a lot of tools to move things around and arrange the functionality of your site, but often the main difference between most websites comes down to presentation.

When you think about it, there’s really not much difference between the functionality of YouTube and Flickr. Certainly, one manages video content and the other focuses on photos. But these sites have more similarities than differences. Both manage media content and allow users to share their uploads. Both allow users to create a network of contacts. Users can create their own profiles, comment on others’ content, and mark content as a “favorite” for later reference.

Functionally, these sites are very similar, but their presentation is completely different. The layout of the sites is different, their backgrounds are different, their entire look and feel is different—each has a different presentation of its elements.

When we talk about theming, we are talking about Drupal’s presentational layer. It is where the site developer is able to take complete control and specify what goes onto the page. All CSS, JavaScript, images, and HTML can be rearranged and overridden by a Drupal theme. Drupal’s theme system can provide special formatting of the site for ...

Get Using Drupal 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.