Separate theme for a specific node


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

If you want to use a specific node.tpl.php for a node, paste or merge this code into your template.php


Copy this code and paste it in your HTML
  1. <?php
  2. function _phptemplate_variables($hook, $vars = array()) {
  3. switch ($hook) {
  4. case 'node':
  5. $vars['template_files'] = array('node-'. $vars['nid']);
  6. break;
  7. }
  8. return $vars;
  9. }
  10. ?>

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

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.