Return to Snippet

Revision: 61439
at December 13, 2012 01:00 by ihadgraft


Initial Code
// get the field
$field = content_fields($field_name);

// render the field
content_view_field($field, $node, $teaser, $page);

Initial URL

                                

Initial Description
The correct and reliable way to render a CCK field.

Variables used:

* $field_name: the name of the field to render
* $node: a node object
* $teaser: TRUE if being rendered for a teaser
* $page: TRUE if being rendered for a page

Initial Title
Render a CCK field

Initial Tags

                                

Initial Language
PHP