I've inherited a custom Drupal 7 theme with many template files. I'm sure lots of them aren't actually used by the website, and were part of the testing process.

Is there a method to list which .tpl.php files are being used in the website, or for a particular page?

  • Take a look at Theme Developer. Don't know how much a help it'll be, but possibly at least a bit.
    – Mołot
    Commented Nov 19, 2014 at 15:50

2 Answers 2


Just print the theme hook suggestion variable in any preprocess function in template.php


If you use the Devel module then

  • That doesn't list theme files in use. Commented Nov 19, 2014 at 16:58

I don't know if its 'right' because I'm new to Drupal, but I also inherited a Drupal site and I had the same problem. I'm using custom Google Analytics events to track what URLs load certain things. For example, every time a view is loaded it fires a custom GA event with the view's machine name and URL. A few weeks later I can see exactly what views are used and where.

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.