/ Published in: PHP
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
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
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
// get the field $field = content_fields($field_name); // render the field content_view_field($field, $node, $teaser, $page);