Opensource, CMS, PHP, MySql, Drupal, Frameworks

Monday, February 14, 2011

Alter page layout based on content type

Call the differant page layouts by using following code..

function phptemplate_preprocess_page(&$vars) {
if($vars['node']->type == 'story'){
$vars['template_files'][] = 'page-story';
}
}