I'm writing a new Drupal theme. I have a html.tpl.php and a page.tpl.php (soon to add a set of node.tpl.php's for each different content type). I want my page.tpl.php to be used for every page, including the front page — every page is going to have exactly the same layout, so I don't need a page-front.tpl.php.
When I visit www.example.com/node/whatever, my page.tpl.php is applied.
When I visit www.example.com (the front page), my page.tpl.php is completely ignored — I'm assuming that Drupal is looking for page--front.tpl.php, not finding it, and then ignoring my page.tpl.php.
How do I get Drupal to use my themes page.tpl.php template for the front page?
edit:
Apparently my front page isn't even being counted as a node?!? The below code will die on any page except for the front page:
function cefmap_preprocess_page(&$vars, $hook) {
if (isset($vars['node'])) {
die;
}
}
How do I get my front page to be treated as a node like any other node?
edit:
Think I've worked this out, and it's really dumb of me. I set that node to "be the front page" through structure, menus, main menu and then set the path for the link to be "<front>".
Of course, that just changes the link in the menu to be "/", without changing the actual path of the node. So I don't actually have a node at "/", and so I don't get to have a page template or a node template applied.
page--front.tpl.php
with 2 dashes, see stackoverflow.com/a/7919007/872050