1

I'm creating my sub-theme based on Zen's starterkit. I copied node.tpl.php from zen to my theme and started making some customizations. Then I realized that I really only wanted those customizations to happen to the Article content type, so I renamed my subtheme's node.tpl.php to node-article.tpl.php but when I do it doesn't get used when I'm viewing my front page which has a list of articles. If I rename it back to node.tpl.php then it immediately gets used again. Back to node-article.tpl.php and I get nothing.

What am I doing wrong?

4

Are you using Drupal 7? If so, you should just leave node.tpl.php as it was originally and call your customized version node--article.tpl.php.

If you are using D6 you are naming the file right, you should just leave a copy of the original node.tpl.php in your subtheme folder.

|improve this answer|||||
  • Ah, that was it! Yes, I'm using Drupal 7, I didn't realize I needed two dashes. The file works when named node--article.tpl.php – Kenny Wyland May 15 '12 at 18:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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