/ Published in: PHP
change the display of cck grouped terms to implode (commas, no divs) for a cerain field only
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
/** * remove divs from multiple fields when grouping terms * */ //this might cause errors cause we only want to avoid them for the speaker field. also this should be changed to an implode to get the list right function MYtheme_content_view_multiple_field($items, $field, $values) { if ($field['field_name'] == 'field_speaker'){ return $output;} else {$output = ''; $i = 0; foreach ($items as $item) { $output .= '<p class="field-item field-item-'. $i .'">'. $item .'</p>'; $i++; } } return $output;} }
URL: http://drupalcontrib.org/api/function/theme_content_view_multiple_field