4

I wonder if any still remember how to override a particular node in Drupal 5 ? I have tried out several ways but didn't work. Couldn't find such info any more on google.

node-13.tpl.php

node--13.tpl.php

1
  • double dash is for D7, have you included the preprocessor function in template file drupal.org/node/249726
    – Bala
    Commented Dec 26, 2014 at 10:01

1 Answer 1

3

In Drupal 5 you need to add the suggestion yourself by placing this function in your theme's template.php:

function _phptemplate_variables($hook, $vars = array()) {
  switch ($hook) {
    case 'node':
      $vars['template_files'] = array('node-'. $vars['nid']);
      break;
  }
  return $vars;
}

Once that's done you'll be able to use node-13.tpl.php (note the single dash).

Source: Separate node template for a specific node.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.