Set page template file to use based on content type
If you want to change page.tpl.php to a different one based on the content type you can add a condition in preprocess_page function in your themes template.php file.
Probably you have a phptemplate_preprocess_page() or a [your_theme]_preprocess_page().
<?php
function phptemplate_preprocess_page(&$variables) {
if ($variables['node'] && arg(2) != 'edit') {
$variables['template_files'][] = 'page-'. $variables['node']->type;
}
}
?>
Then make a copy of page.tpl.php and rename the copy to page-[your-content-type].tpl.php, and make the changes you want. Don't forget to rebuild the theme registry, to make changes take effect.
Knowledge keywords: