From time to time I have pages within the Drupal architecture that I don't want to use the standard page.tpl.php.tpl and html.tpl.php. I want to create a template for specific nodes that uses a unique one for each. It cannot have any drupal code in it. Is this possible?
This applies to Drupal 7...
Make a copy of
page.tpl.php from your active theme's directory e.g
If the theme does not have
page.tpl.php file then make a copy of Drupal's default version at
Rename your copied file in your theme folder with one of the following naming convention. Use this format for a node content type (example uses a custom content type called 'news'):
Or for a specific node use the ID number (example uses node ID of 12):
The same applies for
html.tpl.php For a specific content type use:
For a specific node
These will take precedence over the generic
page.tpl.php if the ID or content type matches.
You should use theme_debug if you are dealing with Drupal 7.33 or newer. That will give you all the information you need in the html source code, for the active templates used in your page and - most importantly - for suggested template files that would allow you to override as you see fit.
And yes, you can have a tpl.php file without any php code in it, be it Drupal specific or not.