Lin Clark

Intro to Drupal 7: Theming Fields and Nodes with Templates

Submitted by Lin on

Override Drupal's default HTML output using templates. You can override individual fields and content types.

Video #8 in this Intro to Drupal 7 series.

Comments

After watching the

After watching the screencast, I felt that theming in D7 is much more convenience, flexible and easier than D6.

But I'm curious, should all template files should put under templates folder in my own theme folder in D7 ?

In D6, all templates are just sit under the root of theme folder.

I'm pretty sure you don't

I'm pretty sure you don't technically need to put all template files in a special templates folder, but since Zen does it and John Albin who maintains Zen also is one of the major players in the D7 theme layer, I figure it's a best practice.

oh!! you just saved my

oh!! you just saved my life!!! thanks a lot!! God bless you! :D

you should keep teaching us with more awesome videos like this ;)

Feeling enlightened …

Hi Lin, I just have to say “thank you” for this great introduction! Suddenly, I feel like I can build anything with “Drupal 7”.
;)

Do I have to make a new

Do I have to make a new field.tpl.php if for instance I have a section in my node.tpl.php where I want some of my fields to have the same look? usually I would put them all in a div, but thats not working. I might be using these fields diferently depending on the node.

thank you

I've spent days looking for this information -- how to print / render specific fields in Drupal 7.  thank you so much. excellent video. concise & easy to follow.