Answers.Body: <p>I've resolved this for my needs and here is my solution in case anyone else needs to do the same thing.</p>
  
  <p>I would have liked to use the Views Aggregator Plus module however I am not using a table for rendering my results and I have somewhat specific needs for the way the results are formatted.</p>
  
  <p>My solution was to create Custom Views Field and in my field handler, I queried the CiviCRM API to pull all of the Groups per Contact ID. In order to limit the Groups to the ones I wanted to render, I used the Visibility setting for "Public Pages" and put a conditional in the loop that produces the results. </p>
  
  <p>Hooks:
  hook_views_data()
  hook__views_api()</p>
  
  <p>In my views filed handler inc file I created a class that extends views_handler_field to run my logic and return my results. </p>
  
  <p>I acquired the contact id and placed it in avariable called $contactid then used the following CiviCRM API code to get my groups array</p>
  
  <pre><code>$groups = civicrm_api3('GroupContact', 'get', array(
    'sequential' =&gt; 1,
    'contact_id' =&gt; $contactid,
  ));
  </code></pre>
  
  <p>The rest was pretty straight forward looping and concatenating the string of Group Titles.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-06-29T03:06:31.007Z
Answers.LastActivityDate: 2018-06-29T03:06:31.007Z
Answers.UserDisplayName: Andrew Wasson
Answers.Body: <p>You can use <a href="https://www.drupal.org/project/views_aggregator" rel="nofollow noreferrer">Views Aggregator Plus</a> module to group contact 2 rows. </p>
  
  <p><strong>Views Setting</strong>
  <a href="https://i.sstatic.net/k5Jgv.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/k5Jgv.png" alt="enter image description here"></a></p>
  
  <p><strong>Table format setting</strong>
  <a href="https://i.sstatic.net/MALgv.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/MALgv.png" alt="enter image description here"></a></p>
  
  <p><strong>Result</strong>
  <a href="https://i.sstatic.net/SXAFW.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/SXAFW.png" alt="enter image description here"></a></p>
  
  <p>HTH</p>
  
  <p>Pradeep</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-06-28T17:53:28.053Z
Answers.Text: Thank you @Pradeep Nayak. I'll give that a whirl and report back.
Answers.UserDisplayName: Andrew Wasson
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-06-28T18:06:21.430Z
Answers.Text: I'm not sure that this will work for me. I'm using a display type of unordered list and I plan to Have the Firstname, Lastname + Groups on one line in my rendered view. I'll have a look at this further later today and see if I can use it. Aside from the need of a table display type, it does exactly what I want it to do.
Answers.UserDisplayName: Andrew Wasson
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-06-28T09:24:58.690Z
Answers.LastActivityDate: 2018-06-28T09:24:58.690Z
Answers.UserDisplayName: Pradeep Nayak
Body: <p>Ok, this should be very straight forward but it doesn't appear to be. </p>
  
  <p>I have a CiviCRM Contact View in Drupal 7. It is a contact search of sorts. When a contact is rendered a number of things are displayed. The contacts can be a member of one or more CiviCRM Groups and I would like to display a comma delimited list of the groups that each contact belongs to. At present Drupal Views only displays the first group.</p>
  
  <p>Any ideas of how to render more?  </p>
  
Tags: <drupal><drupal-views>
Title: Drupal CiviCRM Contact View -- Show all groups for a contact
ThreadText: # Drupal CiviCRM Contact View -- Show all groups for a contact
  
  (Asked by: username_0 on 2018-06-28)
  
  Ok, this should be very straight forward but it doesn't appear to be.
  
  I have a CiviCRM Contact View in Drupal 7. It is a contact search of sorts. When a contact is rendered a number of things are displayed. The contacts can be a member of one or more CiviCRM Groups and I would like to display a comma delimited list of the groups that each contact belongs to. At present Drupal Views only displays the first group.
  
  Any ideas of how to render more?
  
  **Tags:** drupal, drupal-views
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_0 on 2018-06-29. Score: 1 | Accepted answer
  
  I've resolved this for my needs and here is my solution in case anyone else needs to do the same thing.
  I would have liked to use the Views Aggregator Plus module however I am not using a table for rendering my results and I have somewhat specific needs for the way the results are formatted.
  My solution was to create Custom Views Field and in my field handler, I queried the CiviCRM API to pull all of the Groups per Contact ID. In order to limit the Groups to the ones I wanted to render, I used the Visibility setting for "Public Pages" and put a conditional in the loop that produces the results. 
  Hooks:
  hook_views_data()
  hook__views_api()
  In my views filed handler inc file I created a class that extends views_handler_field to run my logic and return my results. 
  I acquired the contact id and placed it in avariable called $contactid then used the following CiviCRM API code to get my groups array
  $groups = civicrm_api3('GroupContact', 'get', array(
    'sequential' => 1,
    'contact_id' => $contactid,
  ));
  
  The rest was pretty straight forward looping and concatenating the string of Group Titles.
  
  
  ---
  
  ### Answer by username_1 on 2018-06-28. Score: 1
  
  You can use [Views Aggregator Plus](https://www.drupal.org/project/views_aggregator) module to group contact 2 rows.
  
  **Views Setting**
  [![enter image description here](https://i.sstatic.net/k5Jgv.png)](https://i.sstatic.net/k5Jgv.png)
  
  **Table format setting**
  [![enter image description here](https://i.sstatic.net/MALgv.png)](https://i.sstatic.net/MALgv.png)
  
  **Result**
  [![enter image description here](https://i.sstatic.net/SXAFW.png)](https://i.sstatic.net/SXAFW.png)
  
  HTH
  
  Pradeep
  
  > **Comments:**
  > **username_0**: Thank you @username_1. I'll give that a whirl and report back.  
  > **username_0**: I'm not sure that this will work for me. I'm using a display type of unordered list and I plan to Have the Firstname, Lastname + Groups on one line in my rendered view. I'll have a look at this further later today and see if I can use it. Aside from the need of a table display type, it does exactly what I want it to do.  
  
  ---
  
  