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) »
  • Discussion (deprecated) »
  • Alpha and Beta Release Testing »
  • 3.0 Release Testing »
  • Is there a "hook" which can add elements on the Contact Relationship Page
Pages: [1]

Author Topic: Is there a "hook" which can add elements on the Contact Relationship Page  (Read 3662 times)

SarahG (FountainTribe)

  • Ask me questions
  • ****
  • Posts: 782
  • Karma: 29
  • CiviCRM version: 4.4.7
  • CMS version: Drupal 6, Drupal 7
  • MySQL version: 5.5
  • PHP version: 5.3
Is there a "hook" which can add elements on the Contact Relationship Page
September 27, 2009, 01:48:22 pm
Is there a hook available for the Contact "relationship" page that is similar to HOOK_civicrm_summary?   I would like to list derived relations for a contact on the "Relationship" page/tab.

For example: John is a parent of Bob. Bob is a parent of Susan.  So on the relationship screen, I would like to show that John is a grandparent of Susan.  ( Without requiring that someone add the grandparent relationship directly between John and Susan. )    

Another example: Paul is a child of Debbie . Steve is a child of Debbie. I would like to show that Paul is the sibling of Steve.

« Last Edit: September 27, 2009, 01:50:28 pm by sgladstone »
Did I help you? Please donate to the Civi-Make-It-Happen campaign  CiviCRM for mobile devices! 

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: Is there a "hook" which can add elements on the Contact Relationship Page
September 27, 2009, 08:28:38 pm

you can use hook_pageRun and customize the template to show derived relationships

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: Is there a "hook" which can add elements on the Contact Relationship Page
September 28, 2009, 06:18:49 am
Hi,

You can also add a custom api "calculatedrelationship_get", that returns the list of contacts that are grandparent of (or sibling or...), and call that from within the template with {crmAPI}

http://civicrm.org/node/599
-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) »
  • Discussion (deprecated) »
  • Alpha and Beta Release Testing »
  • 3.0 Release Testing »
  • Is there a "hook" which can add elements on the Contact Relationship Page

This forum was archived on 2017-11-26.