/ Published in: PHP

Only this portion needed
// Add page template suggestions based on node type, if we aren't editing the node.
if ($vars['node'] && arg(2) != 'edit') {
$vars['template_files'][] = 'page-nodetype-'. $vars['node']->type;
}
// Add page template suggestions based on node type, if we aren't editing the node.
if ($vars['node'] && arg(2) != 'edit') {
$vars['template_files'][] = 'page-nodetype-'. $vars['node']->type;
}
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
/** * Override or insert PHPTemplate variables into the templates. */ function _phptemplate_variables($hook, $vars) { if ($hook == 'page') { // Add page template suggestions based on node type, if we aren't editing the node. if ($vars['node'] && arg(2) != 'edit') { $vars['template_files'][] = 'page-nodetype-'. $vars['node']->type; } if ($secondary = menu_secondary_local_tasks()) { $output = '<span class="clear"></span>'; $output .= "<ul class=\"tabs secondary\">\n". $secondary ."</ul>\n"; $vars['tabs2'] = $output; } // Hook into color.module if (module_exists('color')) { _color_page_alter($vars); } return $vars; } }
Comments
