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
Than开发者_开发问答ks a lot for your time
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';
}
// ...
}
精彩评论