I added a node-product.tpl.php file to my theme and it is completely ignored.

I reset the caches, multiple times, and tested with devel + devel_themer to see that the name was correct and it is. It says it searches for:

  • node-product.tpl.php
  • node-product.tpl.php
  • node.tpl.php

Why would the core theme() function not find that template?

My only answer would be that somehow the theme path is not yet available in the theme() function at the time the product is being generated.

1 Answer 1


(Assuming you are on Drupal 6, as it seems) you also need to copy the default node.tpl.php (e.g. the one from your base theme) in the same theme directory you are putting the override file (node-product.tpl.php) in order for the theme engine to pick it up:

If you are implementing a suggestion, rename the file to the suggestion name it should have. Note that some suggestion files will not be recognized unless their base file is also present -- for instance, if you want to make a node content type suggestion file for your content type, you need to have node.tpl.php present in your theme directory order for your node-my_content_type.tpl.php file to be recognized. (Beginners guide to overriding themable output)

  • Great! 8-) I think I saw that before, but it's just a bad gotcha... Thank you for taking the time to answer. Commented Jan 5, 2012 at 1:42

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.