Drupal - Page templates depending on node type


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. function themename_preprocess_page(&$variables) {
  2. if ($variables['node']->type != "") {
  3. $variables['template_files'][] = "page-node-" . $variables['node']->type;
  4. }
  5. }

URL: http://drupal.org/node/249726

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.