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 »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • Injecting additional sections on the user contact dashboard
Pages: [1]

Author Topic: Injecting additional sections on the user contact dashboard  (Read 1028 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
Injecting additional sections on the user contact dashboard
October 30, 2011, 03:02:56 am
I am trying to add some additional sections on the user's dashboard ( ie the one at:  /civicrm/user?reset=1 )

I have implemented the hook:
function hook_civicrm_links( $op, $objectName, $objectId, &$links ){
     if( $op == "view.contact.userDashBoard" && $objectName == "Contact"){


This hook gets called, but the output is not shown in the areas where "Your Membership(s)" and other standard sections appear. 

How can I make my custom section appear the same way as all the standard sections do?



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: Injecting additional sections on the user contact dashboard
October 31, 2011, 08:03:22 am

That hook is used only to add (or remove) links on the Related Contacts section

You can potentially add more sections by using the pageRun hook and customizing the template

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: Injecting additional sections on the user contact dashboard
October 31, 2011, 08:31:07 am
Hi,

Otherwise, xxx.extra.tpl works great to inject more stuff. IN conjunction with crmAPI, you can pretty much adding whatever you want.

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) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • Injecting additional sections on the user contact dashboard

This forum was archived on 2017-11-26.