Hi I am working on the pushbutton theme. How can I create seperate page.tpl files for different pages (Like different page.tpl for index... )

Comments

Crell’s picture

I know there's a handbook page on it somewhere, but I can't seem to find it right now. What I do is put the following in my page.tpl.php:


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

And then page-home.tpl.php and page-main.tpl.php have the real content. You can, of course, have however many if-elseif statements you need and use whatever checks you need. ($is_front, checking the path with arg(), whatever.)

sime’s picture

Status: Active » Fixed

Bunch of examples here (links at the bottom).
http://drupal.org/node/46006

Anonymous’s picture

Status: Fixed » Closed (fixed)