1

I'm new to drupal and having trouble naming a page template file. In drupal 7, let's say I've created a basic page with the url path as:

www.example.com/my-page

When I create a custom page template file, I've been able to get the file name page--node--[nid].tpl.php to work fine. However, I have 3 different sites (localhost, development, and production) and each has a different node id for this page (because the databases aren't sync'd). I need to find a way to name the template file according to the url path. I've tried all of the following, none of which has worked:

page--my-page.tpl.php
page--my_page.tpl.php
page--node--my-page.tpl.php
page--node--my_page.tpl.php

Any suggestions?

bassnoodle
  • 101
  • 1
  • 1
  • 5
  • see http://stackoverflow.com/questions/5194109/drupal-7-candidate-page-tpl-name-for-particular-custom-content-type-entry – nmc Jan 26 '12 at 20:03
  • Read my answer here http://stackoverflow.com/questions/8268003/using-front-tpl-in-drupal-7-for-another-page/8268541#8268541 – Vlad Stratulat Jan 27 '12 at 09:39

1 Answers1

0

Check out the theme developer module. With it you should be able to get a list of possible template names that are being considered.

istruble
  • 13,363
  • 2
  • 47
  • 52