Render a CCK field with only the node object in Drupal 6 If I have a node object and would like to render just a given CCK field, how would I do so? I don't mean on a node template page or in a nodeapi hook, just in general.

My custom CCK field's theme_mymodule_formatter_default function takes an $elements array - when this function is called on the node page, $elements is an array with keys including the following:


#formatter
#node
#field_name
#theme
0
1


...where 0 and 1 point to arrays of values in the multi-valued CCK field.

Now if I want to render this field, and all I have is my formatter function and a node object, how do I format it? If I call theme('mymodule_formatter', $node-&gt;field_my_cck_field[0]), what gets passed to the $elements array of my formatter function is an array with only the following keys


0
1


But rather than even having to call the theme() method, I'd like to call something like drupal_render() that will pick the default theme formatter function. I imagine there's a way to do something like this, I just don't know how.
In D6, you can render CCK fields with:

content_format

e.g:

print content_format('field_my_cck_field', $node-&gt;field_my_cck_field[0], 'default', $node);


See also content_view_field for an alternative option.

If you're in a node template and the field is set to display, you can also just go:

print $FIELD_NAME_rendered // where $FIELD_NAME is the field name