Skip to content

Instantly share code, notes, and snippets.

@frankyonnetti
Last active February 17, 2021 03:51
Show Gist options
  • Save frankyonnetti/5944719 to your computer and use it in GitHub Desktop.
Save frankyonnetti/5944719 to your computer and use it in GitHub Desktop.
Drupal 6 - print CCK field #drupal #d6
<?php if(isset($node->field_NAME[0]['value']) && $node->field_NAME[0]['value'] != ''): ?>
<div class="name">
<?php print $node->field_NAME[0]['value'] ?>
<!-- OR -->
<?php print content_format('field_NAME', $field_NAME[0]); ?>
</div>
<?php endif; ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment