I've created a cck field and called it authors so the machine name is field_authors. To print this field in a view template, i'm doing this - print $fields['field_authors_value']->content;
In case is there 2 or 3 values it prints each value on separate line, and i want something like author1, author2, author3. (comma separated)
Tried to do this way in template.php:
function mytheme_content_view_multiple_field($items, $field, $values) {
$output = '';
switch($field['field_name']) {
case 'field_authors_value':
$output .= '<div class="field-item">'. implode(', ', $items) .'</div>';
break;
default:
foreach ($items as $item) {
if (!empty($item) || $item == '0') {
$output .= '<div class="field-item">'. $item .'</div>';
}
}
break;
}
return $output;
}
but it has no effect. What im doing wrong?