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 »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Displaying related contact
Pages: [1]

Author Topic: Displaying related contact  (Read 770 times)

e_mason

  • I post occasionally
  • **
  • Posts: 65
  • Karma: 1
  • Eliot Mason
  • CiviCRM version: 4.05
  • CMS version: Drupal 7
  • MySQL version: 5.1xx
  • PHP version: 3.53
Displaying related contact
September 13, 2011, 06:47:08 am
Can't seem to figure this out...What's the best way to display a related contact to a user logged into the cms?

I need to display information on the assigned counselor - contact info, a custom field, photo, etc.  This should be easy...but for starters I can't get the "Contact Dashboard" to display any relationships (and btw... its not available on the d7 demo site so I can't test it there  :().

Ultimately I'd like a Drupal block that would show this information.

Pointers anyone?

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Displaying related contact
September 13, 2011, 07:22:22 am

Only related contacts that are "permissioned" are displayed on the contact dashboard

so in the relationship, ensure u check that "Contact A has permission to edit/view details of Contact B"

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

e_mason

  • I post occasionally
  • **
  • Posts: 65
  • Karma: 1
  • Eliot Mason
  • CiviCRM version: 4.05
  • CMS version: Drupal 7
  • MySQL version: 5.1xx
  • PHP version: 3.53
Re: Displaying related contact
September 13, 2011, 07:39:23 am
Ok - we'll that explains why the Contact Dashboard wasn't displaying... and shows that I can't borrow the functionality of the dashboard b/c I can't set permissions that way.

I need "children" to see info on their "parent".  I can do this via the API - is there no way to do this via  profile?


Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Displaying related contact
September 13, 2011, 08:50:48 am

u can potentially try to do this via views and get the "related contact" info.

profile is basically restricted to one contact

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

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 related contact
September 13, 2011, 12:07:38 pm
You can also override (or add at the bottom using the .extra.tpl new feature) and use {crmAPI} to fetch the relationship, then normal smarty to display them.

http://civicrm.org/node/599

and use the api explorer to find what params you need for the relationship api.

X+
-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 »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Displaying related contact

This forum was archived on 2017-11-26.