Reputation: 578
Using drupal 7 is great. The api is full of great ideas - although I miss some OPP sometimes.
Now I stuck on a problem with defining different page templates for different nodes.
After searching for this problem in the official documentation I found out that drupal uses suggestions to find templates like page-node-nid.tpl.php
.
My Situation:
I have a page called "Skills" with the id 2. The url is /skills
(don't know if this is important) and I have a template called /templates/page-node-2.tpl.php
. But drupal doesn't load the file. I also try to rename the original page.tpl.php
to see that I'm working in the right directory. Clearing the cache doesn't work either.
What am I doing wrong?
Hope you can help!
Thanks in advance!
Upvotes: 1
Views: 2659
Reputation: 383
There seems to be an error in the documentation. try page--node--2.tpl.php Note that there are 2 dashes rather than 1
That works for me in Drupal 7
Upvotes: 4
Reputation: 6891
Upvotes: 0