I'm using Drupal 6.19 and trying to debug why a custom page template for my login page isn't being picked up. I've tried to use devel themer, but I don't see the "widget" when I'm not logged in, and of course I can't see the login page when I am.

I'm hoping for a script that I can drop in on my page tpl that will print the current template being used. Or maybe there are other suggestions?

  • 1
    What is your Template filename, and what is your URI? If Devel is installed try a dpm(); output: drupal.org/node/174575 Commented May 3, 2012 at 14:46

3 Answers 3


For Drupal 7, there's a new 'theme debug mode'. This eliminates the need for installing the Theme Developer module and its dependencies, if all you want is to see the templates being used on a page.

As of Drupal 7.33, Drupal core has a theme debug mode that can be enabled and disabled via the theme_debug variable. Theme debug mode can be used to see possible template suggestions and the locations of template files right in your HTML markup (as HTML comments). To enable it, add this line to your settings.php:

$conf['theme_debug'] = TRUE;

see https://www.drupal.org/node/223440


Checkout Theme Developer module.

Firebug for Drupal themeing. Note that this module injects markers into the DOM to do its magic.


Been a while since I've touched 6, so vars may be different than I recall, but you could use:


Inside of a preprocessor function. That will tell you what the system is trying to use. At that point I'd look for the files and put insert in 'This is path/to/file.tpl.php' in the templates.

Hope that helps.

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.