Adding CCK fields to TPL files

Just a quick tip..

Displaying fields in tpl files, like the node.tpl.php files, is a common desire to designers/themers. Many people think you need to make calls to something like $node->content['field_FOO']['#XXX']; to get to the information.

That's not the ninja way.. use $FIELD_NAME_rendered in your .tpl files where fields are attached.
This is true in Drupal 6 CCK and Drupal 7 fields.

Check it out, let us know how you get on.

web hosting

success! Whether it’s web design, web marketing, or web hosting, President Scott Eagle has the knowledge ..
pay per click UK

tags for Adding CCK fields to TPL files

To get the last Drupal Ninja Tips

Sign Up Below
First Name *
Email *

Recent comments