I am using the PHPTemplate Theme Engine.

On my general settings, I have "index.html" set to default front page.

In my page.tmp.php file, I have the following logic set:

	
switch($node->type) {
	case ($is_front):
		include 'page-front.tpl.php';
		return;
	default:
		include 'page-default.tpl.php';
		return;
		
}

When I access my home page (index.html) the appropriate template (page-front.tpl.php) gets used. However, why is it that when I access anything with paths like: "node/add", "user/*", "tracker", etc., does the "page-front.tpl.php" template get used? I want the entire CMS interface to be rendered with the "page-default.tpl.php" template.

By the way, other static content pages work correctly - they use the "page-default.tpl.php" as they should. Why is the $is_front node type being applied to pages outside of "index.html"?

Thanks for your help.

Comments

casey’s picture

$node->type is only for node pages and should be used in node.tpl.php. You want something like:

if($is_front) {
  include 'page-front.tpl.php';
else {
  include 'page-default.tpl.php';
}
ivank’s picture

Thanks casey, it works great, and your explanation was appreciated. Final code used:

if($is_front) {
	include 'page-front.tpl.php';
	}
else {
	include 'page-default.tpl.php';
	}

A lot of my confusion stems from Customising the full page layout and sections based on node type document -- which isn't fully congruent with your recommendations.