Theming CCK fields
Netter Screencast auf Friendly Drupal über CCK Fields Theming.
Using CCK field templates
CCK comes with a default field template, called content-field.tpl.php. Copy it from the module directory (cck/theme) to your theme.
In addition to the default template, you also have several template suggestions based on it.
As typical with Drupal, the more specific options (e.g. the last one in the list) would have a precedence over the more generic one.
When you open content-field.tpl.php, you’ll see available variables such as $field_name or even the $node object. (…)
Using Drupal preprocess functions.
In what situation preprocess functions are preferable to working directly with the templates? Well, for one thing, you’re likely to end up with a ton of different templates with a serious downside in terms of maintenance. Or, just like in our example, you might need to use some piece of code that is shared across several fields but has to display different contents depending on the field or other context.
Let’s begin by opening template.php file for your theme (create it if there isn’t one yet). Then you can add preprocess function for the field template:
function your_theme_preprocess_content_field(&$vars) { // code here }

