The Definitive Guide to Drupal 7

Using the Theme Developer Module

Of course, when you’re first starting out with Drupal, you’ll need to get an idea of where the code is located and what you need to override in the first place. The Theme Developer module is the perfect tool to help you figure this out. Once enabled, a checkbox will appear in the bottom right corner of the page. When clicked, a semi-transparent, resizable, and draggable window appears in the top right corner of the page. You can then move it around and click on any element of the page and the window will populate with all the information you need to know—and more (see Figure 16-3).

For example, when clicking a node, the following information is made available in the window:

  • The parent functions and templates that affect the element
  • The template or theme hook suggestions (candidates)
  • The preprocess and process functions being used
  • A printout of the variables available
Screenshot of Theme Developer module
Figure 16–3. The Theme Developer window shows theme-related information about the element that was clicked (a node in this case).

You are reading content from two chapters on Theme Development from The Definitive Guide to Drupal 7, written by Jacine Luisi and published by Apress on July 19, 2011. All rights reserved.