CCK

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.

To get the last Drupal Ninja Tips

Sign Up Below
First Name *
Email *

Recent comments