I want to have something like node-type-form.tpl.php in my theme to control the layout of a few of my different content type node forms. I know that I should开发者_Python百科 be able to put something in my template.php to accomplish this.
Look at that module: Node form template
In your template.php, you can create a preprocess function. In this preprocess function, you can edit the template files like this:
if($variables['teaser'] == 1) {
$variables['template_files'][] = "node-" . $variables['node']->type ."-teaser";
}
精彩评论