Web design, programming, graphics, and pretty much anything else I care about.


Retrieving custom field formats in Drupal template files

This is part of CCK:

('field_cckfieldname', $node->field_cckfieldname[0], 'machine_name_of_custom_format')

You send it the name of the field you are referencing, the data, and the name of the format you want. If you don't include the format, it uses the default for that field. It returns fully-formatted HTML. Example,

<span class="date-display-single">Friday, October 16, 2009, at 8:00 pm</span>