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 »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Expose data from default contact tabs inline on summary tab instead?
Pages: [1]

Author Topic: Expose data from default contact tabs inline on summary tab instead?  (Read 955 times)

linkx

  • I post occasionally
  • **
  • Posts: 86
  • Karma: 7
Expose data from default contact tabs inline on summary tab instead?
May 07, 2010, 10:02:14 am
Is there a straighforward way to have data from a particular contact tab (relationships, activities, etc.) display inline on the summary tab instead of in its own tab?

I know custom data fields give the option of "tab or inline" but I would like to expose relationships data inline on the summary tab (saves a click for my users)

Thanks.

linkx

  • I post occasionally
  • **
  • Posts: 86
  • Karma: 7
Re: Expose data from default contact tabs inline on summary tab instead?
May 07, 2010, 12:37:19 pm
I attempted to paste the code from CRM/Contact/Page/View/Relationship.tpl into the bottom portion of CRM/Contact/Page/View/Summary.tpl

And this just adds a relationships area to the bottom of the summary tab, with the message "There are no Relationships entered for this contact. You can add one" even though the relationships TAB for that contact lists 3 relationships.

I also copied the tpl files that are called in Relationships.tpl into my custom templates folder structure.
« Last Edit: May 07, 2010, 12:58:00 pm by linkx »

Kiran Jagtap

  • Ask me questions
  • ****
  • Posts: 533
  • Karma: 51
Re: Expose data from default contact tabs inline on summary tab instead?
May 10, 2010, 12:06:29 am
you need some custom php codding in CRM/Contact/Page/View/Summary.php which going to fetch relationships for given contact and assign to templates.

you might want to take a closer look for CRM/Contact/Page/View/Relationship.php and templates/CRM/Contact/Page/View/Relationship.tpl
here Relationship.php is responsible to fetch data from db and assign to template.
Relationship.tpl is only responsible to display assigned data to user in well html format.

hope this help

kiran
You Are Designed To Choose... Defined By Choice.

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Expose data from default contact tabs inline on summary tab instead?
May 15, 2010, 05:56:38 am
Easier option: override on your custom template folder the summary, and use {crmAPI} to fetch the relationships and display them.

You have an example in the book on the api chapter (read the template chapter as well if you want more info about how to override templates)

http://en.flossmanuals.net/CiviCRM/DevelopAPI

Good luck, share your result here when you succeed!
-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 »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Expose data from default contact tabs inline on summary tab instead?

This forum was archived on 2017-11-26.