Return to Snippet

Revision: 17306
at August 31, 2009 13:13 by canarymason


Initial Code
function THEMENAME_content_view_multiple_field($items, $field, $values) {
  $output = '';
  foreach ($items as $index => $item) {
    if (!empty($item) || $item == '0') {
      $classes = 'field-item';
      $classes .= ' field-item-'. ($index+1);
      $output .= '<div class="'. $classes .'">'. $item .'</div>';
    }
  }
  return $output;
}

Initial URL

                                

Initial Description

                                

Initial Title
incremental classes when grouping multiple cck values in views

Initial Tags
drupal

Initial Language
PHP