[SOLVED][Drupal CCK][Drupal Views] Format the output of CCK field values in Views

| | 1 min read

It is possible to have a scenario in your Drupal installation where you would like to format the output of the CCK field values in your View. One example would be to show all the field values horizontally rather than the default vertical position. If you are facing such a scenario in your Drupal website then checkout our explanation below.

Suppose you have the fields in your view formatted in the vertical position.

AAA
BBB
CCC

and you wish to format it like this in the horizontal position

AAA/BBB/CC

To do this you have to override the function theme_content_view_multiple_field() in your theme's template.php file. This function is located at the bottom of cck/includes/views/content.views.inc
Use the sample code below.

'. implode($separator, $array) .'';
}
?>

Hope that helps.

The easiest way to solve a Drupal issue is to hand it to the Drupal experts. Do you need professional help in building your Drupal site? We can provide a wide range of Drupal services to help you deploy your Drupal site easily and quickly. Get in touch with us to know more.