Hello! I have 4 link fields grouped in the group “group_links”. I use this snippet to print my links in node-product.tpl.php:

foreach($node->content['group_links'] as $key => $groupfield) {
  if ($groupfield['#value']) {
    print $groupfield['#value'];
  }
}

It works well, however I get an extra “<” symbol at the end:

<div id="links-body">

<div class="field field-type-link field-field-links-1"><div class="field-items"><div class="field-item odd">
<a href="http://example.com" target="_blank" rel="nofollow">Link Title</a></div></div></div>

<div class="field field-type-link field-field-links-2"><div class="field-items"><div class="field-item odd"><a href="http://example.com" target="_blank" rel="nofollow">Link Title</a></div></div></div>

<

</div>

Maybe there is another (better) way to output my grouped fields?

Comments

jazzdrive3’s picture

Having the same problem when looping through the content array in the node object. The "<" comes out of nowhere. You find any help with this?

dqd’s picture

Status: Active » Closed (won't fix)

The stop for Drupal 5 support

Since we have to catch up to get ready for the final Drupal 7 release and have to deal with many feature requests for the Drupal 6 and Drupal 7 version of the link field module, we sadly have to annouce the stop of Drupal 5 support. The files will stay for any individual use or customization, but any support in the issue queue and in the forums has expired from now on.

Sorry and thanks for understanding.