2
votes

I have a 3 page drupal(6.20) site, each page has its own template like page-node-1.tpl.php, page-node-2.tpl.php, page-node-3.tpl.php, I would like to set separate templates when editing each node, I tried

page-node-1-edit.tpl.php

but its not working, but page-node-edit.tpl is working, but its common to all nodes, I need separate editing templates for each node like page-node-1-edit.tpl.php and page-node-2-edit.tpl.php

Thanks a lot for your time

1
I asked quite the same thing 1 day ago with no luck. Hopefully someone answers you stackoverflow.com/questions/5041667/…corbacho
I replied my own question. Have a look if can help you in a similar problem: stackoverflow.com/questions/5041667/…corbacho

1 Answers

1
votes

Add this function/or modify if exists into template.php of your theme:

function phptemplate_preprocess_page(&$vars) {
  // ...
  $node = menu_get_object();
  if ($node->nid == '1') {
    $vars['template_files'][] = 'page-node-1-edit';
  } 
  // ...
}