tags:

views:

318

answers:

2

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 be able to put something in my template.php to accomplish this.

A: 

Look at that module: Node form template

451F
This is a great module! I just ended up using this.
websiteguru
A: 

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";
}
Niels
This didn't seem to work for me.
websiteguru
What was the function name you used? Did you clear the cache?
Niels
I added it to Garlands preprocess function. It does work for default node types, but would not work for my custom content types.
websiteguru

related questions