How to show first X items and add and ellipsis [...] if there is more items? I have a View that displays books and authors of each book.

BOOK 1


Author 1, Author 2, Author 3, Author 4, Author 5



BOOK 2


Author 6, Author 7


What I want to do is to show only first 3 authors of each book and add an ellipsis [...] if there is more authors. It's easy to display first 3 items (Multiple Field Settings) but how to add an ellipsis to it?



BOOK 1


Author 1, Author 2, Author 3 ...



BOOK 2


Author 6, Author 7



How can I do that?
I have not tested this, so consider this an educated guess: 

Go to /sites/all/themes/yourtheme/ folder and in template.php add the following code:

function yourtheme_preprocess_views_view_fields($vars){

  if ($vars['view']-&gt;name == "view_name" &amp;&amp; $vars['view']-&gt;current_display == "block_1") {
    if (isset($vars['fields']['field_example'][3]-&gt;raw)){
      $vars['fields']['field_example']-&gt;content = $vars['fields']['field_example'][0]-&gt;raw . ', ' . $vars['fields']['field_example'][1]-&gt;raw . ', ' . $vars['fields']['field_example'][2]-&gt;raw . '...';  
    }
    else { 
      $vars['fields']['field_example']-&gt;content = $vars['fields']['field_example']-&gt;content;  
    }
  }



replace yourtheme with the actual name of your theme
replace view_name with the name of your view.
replace block_1 with the machine name of your view. 
replace example with the name of your field.