CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM (Moderator: Dave Greenberg) »
  • Displaying Group titles on summary contact record
Pages: [1]

Author Topic: Displaying Group titles on summary contact record  (Read 442 times)

mikem

  • I post occasionally
  • **
  • Posts: 70
  • Karma: 0
  • CiviCRM version: 4.4.3
  • CMS version: 7.X
Displaying Group titles on summary contact record
February 27, 2014, 11:34:01 am
What would i need to do to list the group titles in the summary tab on a users contact record? Right now only the taqs are displayed on the summary tab but i need the same thing for the groups to be displayed. The example below is from the custom CRM/Contact/Page/View/Summary.tpl file that i have setup.


Code: [Select]
<div class="contactTopBar contact_panel">
                    <div class="contactCardLeft">
                      <div class="crm-summary-contactinfo-block">
                        <div class="crm-summary-block" id="contactinfo-block">
                          {include file="CRM/Contact/Page/Inline/ContactInfo.tpl"}
                          <div class="crm-clear crm-inline-block-content">
                            <div class="crm-summary-row">
                              <div class="crm-label" id="groupLink">
                                <a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=$contactId&selectedChild=group"}" title="Edit Group">Group</a>
                              </div>
                              <div class="crm-content" id="groups">{$groupContactId}</div>
                            </div>
                            <div class="crm-summary-row">
                              <div class="crm-label" id="tagLink">
                                <a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=$contactId&selectedChild=tag"}" title="{ts}Edit Tags{/ts}">{ts}Tags{/ts}</a>
                              </div>
                              <div class="crm-content" id="tags">{$contactTag}</div>
                            </div>
                            <div class="crm-summary-row">

Erik Hommel

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1773
  • Karma: 59
    • EE-atWork
  • CiviCRM version: all sorts
  • CMS version: Drupal
  • MySQL version: Ubuntu's latest LTS version
  • PHP version: Ubuntu's latest LTS version
Re: Displaying Group titles on summary contact record
February 28, 2014, 01:47:52 am
Use the CiviCRM API to retrieve the groups for the contact? You can use the GroupContact entity and the Get action to retrieve the groups for the contact, and you can use the API within smarty.
Consultant/project manager at EEatWork and CiviCooP (http://www.civicoop.org/)

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Displaying Group titles on summary contact record
February 28, 2014, 03:42:32 am
This extension does it:
https://github.com/TechToThePeople/group2summary

It was done as a support to a session at the last civicon and each branch is a different way of doing it (js, smarty, php, php OO).

I think the master branch is the nicer (it allows you as well do directly add the contact to a group)

https://github.com/TechToThePeople/group2summary/tree/master
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM (Moderator: Dave Greenberg) »
  • Displaying Group titles on summary contact record

This forum was archived on 2017-11-26.