0

I've tried using the page-node-2.tpl.php but it hasn't worked... Is there something I'm missing?

I'm new to Drupal, but I think it might have something to do with not having a template.php in my themes directory?

BenMorel
  • 34,448
  • 50
  • 182
  • 322
PapaSmurf
  • 1,035
  • 2
  • 14
  • 26

1 Answers1

0

See http://drupal.org/node/1089656 for template file name conventions. Note that there are two dashes (--) in between page and node and 2.

Also remember to clear your cache so that Drupal recognizes the new files and/or paths.

nmc
  • 8,724
  • 5
  • 36
  • 68
  • Thanks! But I still can't get the thing working... My URL is like this `www.mysite.co.uk/new/node/2` (Drupal is installed in the 'new' directory) and my file is `page--node--2.tpl.php` Any more suggestions? – PapaSmurf Sep 30 '11 at 07:18
  • @jonathandey where did you put the `page--node--2.tpl.php` file? You need to put it in your theme. If you don't have your own theme/subtheme, you need to create on otherwise the tpl file will not be picked up. – nmc Sep 30 '11 at 11:34
  • I have put it in my sub folder with themes – PapaSmurf Sep 30 '11 at 15:23
  • @jonathandey You can't just put a file in a subfolder of themes. All tpl files must belong to a theme and in order for it to be used, it must belong to the theme that you are using (the active theme). So your tpl file should go into `/sites/all/themes/themeName/page--node--2.tpl.php` – nmc Sep 30 '11 at 17:02
  • @jonathandey and you have that particular theme enabled and set as the default? – nmc Oct 01 '11 at 13:36