How can I display empty text for an empty CCK field that is output in a node template I am using a node-content_type.tpl file to control the content display of a certain content-type. I am rendering the fields like so:

print $node-&gt;field_name[0]['value'];


I want to display some empty text if the field is empty so it doesn't show up blank. Is there a way to set empty text for all of the field of a content type so I don't have to check every field individually? Can I do this in a preprocess function in my theme's template.php file?
You could use an if statement, to check for value, and if not print something else:

&lt;?php
  if (!isset( $node-&gt;field_name[0]['value'] )) {
    print t('My empty text');
  } else {
    print $node-&gt;field_name[0]['value']; 
  }
?&gt;


But I think that if you print the whole field  you don't need to do this. Use something like:

&lt;?php print $node-&gt;field_name_rendered; ?&gt;