Skip to content

Instantly share code, notes, and snippets.

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