Hey guy's

This is a problem i'm stuck on and maybe someone can help me out :

For one of my sites i have 19 templates (each page has a different template). Assigning a template for the entire site is no problem, but now i need to assign each page(node) a different template. How can i do this ?

Up to now i have tried :
-The module: "node_theme"
-And the code :
/**
* Override or insert variables into the node templates.
*
* @param $vars
* An array of variables to pass to the theme template.
* @param $hook
* The name of the template being rendered ("node" in this case.)
*/
function phptemplate_preprocess_node(&$vars, $hook) {
$node = $vars['node'];
$vars['template_file'] = 'node-'. $node->nid;
}

Both of these options with no success.
I have searched on this site and google but no help.

So please, any help or advice is welkom

Comments

CZ’s picture

Priority: Critical » Minor
Status: Active » Closed (fixed)