Home ›
Drupal template helpers to render values, including multivalue fieldsDrupal template helpers to render values, including multivalue fields
Submitted by Benjamin Melançon on October 27, 2010 - 12:16pm
Link Title and URL:
Drupal template helpers to render values, including multivalue fields <?php
function r_join($glue, $field, $value_type = 'view') {
foreach($field as $field_value) {
$values[] = $field_value[$value_type];
}
print join($glue, $values);
}
?>
Have to see if http://api.drupal.org/api/function/drupal_render/7 makes this fully or partially unnecessary in Drupal 7.
Comments
Post new comment