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) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Creating a Custom Tab for Contact
Pages: [1]

Author Topic: Creating a Custom Tab for Contact  (Read 692 times)

Roi

  • I’m new here
  • *
  • Posts: 6
  • Karma: 0
  • CiviCRM version: 4.5.6
  • CMS version: Drupal7.34
  • MySQL version: 5.5
  • PHP version: 5.4.34
Creating a Custom Tab for Contact
March 22, 2015, 10:24:22 am
Hi,
My implementation requires me to add a tab to the contact view. It should allow the user to add several relationships to the contact in a single click of a button, without the need to select the type of relationship etc, as in the Relationships tab.
I managed to add my tab using the doc of hook_civicrm_tabs.
What I didn't figure out is which url to give it in order to fetch my custom template. In fact I didn't understand the url method, for example the Activities tab links to .../civicrm/contact/view/activity?reset=1&cid=XYZ. Which code takes this url and understands that the Activities page should be fetched?

many thanks.

Roi

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: Creating a Custom Tab for Contact
March 22, 2015, 10:27:08 am
Hey roik. In order to do this, your extension needs to create a page, or a form (whichever seems more appropriate) and register it at some url of your choosing. Hopefully you used civix to start your extension - in that case there is a 1 line civix comand to create the skelital page/form.
Try asking your question on the new CiviCRM help site.

Nilda

  • I’m new here
  • *
  • Posts: 12
  • Karma: 0
  • CiviCRM version: 4.5.8
  • CMS version: Wordpress 4.1
  • MySQL version: MySQL 6.2
  • PHP version: php 5.4
Re: Creating a Custom Tab for Contact
April 10, 2015, 02:21:07 pm
Hi Coleman:

I am in the same situation trying to create a content for the new tab
Can you be more specific how works this, maybe with an example

Thank you

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: Creating a Custom Tab for Contact
April 10, 2015, 02:22:48 pm
Nilda I already replied to you on StackExchange. I need more information about what you're trying to do. See http://civicrm.stackexchange.com/questions/446/civicrm-new-tab-content
Try asking your question on the new CiviCRM help site.

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Creating a Custom Tab for Contact
April 10, 2015, 03:41:03 pm
I feel like i just answered a similar question here - with a potential solution using multiple record fields in case it is of interest. I will check on SE and perhaps repeat my suggestion there

http://forum.civicrm.org/index.php/topic,36298.msg154363.html#msg154363
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Creating a Custom Tab for Contact

This forum was archived on 2017-11-26.