Is it possible to make a template for set of nodes in Drupal 7 for example page--node--[601-602-603-604].tpl and if so what is it?

2 Answers 2


You can't do like you explain.

What you can do instead is to add a custom template suggestion for the specific nodes in the preprocess_node function to make the nodes use a specific template that can have any name.


I use this to style a page of nodes of a certain content-type or a node of certain type.

function THEMENAME_preprocess_page(&$variables, $hook) {
   //some other stuff
    if (isset($variables['node'])) {  
    $variables['theme_hook_suggestions'][] = 'page__type__'. $variables['node']->type;
    $variables['theme_hook_suggestions'][] = "page__node__" . $variables['node']->nid;

Then you would have page--type--machine_name.tpl.php, etc...

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.