Hi, I have created a new content type called "din_page" and added the following code to template.php file function function THEMENAME_preprocess_page(&$variables) if (isset($variables['node'])) { if ($variables['node']->type == 'din_page'){ $variables['theme_hook_suggestion'] = 'din__page'; } PHP: and created a new template file din--page.tpl.php When the page loads I see the following in Theme Developer: This suggests that din--page.php should be loaded ... but it doesn't it load page.tpl.php Did I miss anything? I am new to Drupal Thanks, R
you are passing theme_hook_suggestion as a string when it should be an array $variables['theme_hook_suggestions'][] = 'page__din'; see : http://drupal.org/node/223440 for more information about this.
I changed it it to ... if ($vars['node']->type == 'din_page'){ $vars['theme_hook_suggestions'][] = 'din__page'; } PHP: Still getting page.tpl.php loaded. this is what I see in Theme Developer din--page.tpl.php < page--node--2.tpl.php < page--node--%.tpl.php < page--node.tpl.php < page.tpl.php and I did make sure the file is in the right directory. thanks