Search code examples
phpdrupaldrupal-7

drupal - is page.tpl.php required?


I am somewhat new to drupal and I was wondering a few things I can't quite seem to find.

I have noticed html.tpl.php is a required file. Is it possible to just create a template for your nodes/pages without using a page.tpl.php file? For example, by just putting some of the stuff you would put in page.tpl.php in html.tpl.php so that less pages would have to be loaded in?

thanks in advance.


Solution

  • If you do not add a page.tpl.php file in your theme, there will be one loaded by default in modules/system/page.tpl.php

    But bypassing the page.tpl.php sounds possible by adding everything in the html.tpl.php (you can drop any html you want in this template and never call drupal rendering functions), even if the point of doing that seems curious, because it is clearly not impacting on performances enough to justify it and will make your code painfull to maintain and read.