I've just started learning about Drupal 7's theme system. I need to know how the template engine handles php, html, and css inside its template files and how it interacts with Drupal core to make its final output onto the page.

Basically, when we load a Drupal page in browser, what does the template engine do?


1 Answer 1


The Theming Guide is a good place to start. Also the Theming Drupal 6 and 7 pages should be of some help to you (more specifically, How the Drupal theme system works).

Theming guide:

This handbook is about customizing the look and feel of a Drupal site. We'll show you how you can modify the appearance of your Drupal site without requiring expert knowledge of programming. And if you wish to go further, we cover that too.

This guide assumes some knowledge of HTML and CSS but no PHP programming knowledge is necessary. It also assumes you have administrator's privileges to a Drupal site. You might also want to familiarize yourself with some of the terminology used in Drupal. We concentrate on Drupal 7 with notes for Drupal 6 where applicable.

How the Drupal theme system works:

Pages in this section describe the way the Drupal theme system operates, theme components and settings, .info files and page templates. This section is a starting point for creating a new custom theme.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.