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) »
  • Customizing the contact dashboard
Pages: [1]

Author Topic: Customizing the contact dashboard  (Read 1293 times)

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Customizing the contact dashboard
May 25, 2008, 04:04:49 pm
Hi,

I'd like to customise the dashboard to let the user modify themselves (via a profile), see the details of their contact (email, phone...) and register themselves to new events.

I have created a custom Contact/Page/View/UserDashBoard.tpl that is the one used.

However I have several problems from there:

1) I need the contact id to create the link to the profile, but can't find it in the template

2) not all the groups are in the list (only the one public ?) but I need so private ones as well, as based on that I will offer different registration to events links

3) I haven't found any contact field on the variables in the template, and I don't know how to fetch them from within the template to display the details.

Any idea ?

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

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: Customizing the contact dashboard
May 25, 2008, 04:59:54 pm

I dont think customizing userdashboard.tpl is a good idea for your needs. as you mention, there are significant differences between what you need and what it exposes.

I suspect your best bet would be to:

1. create a civicrm form and page to do specifically what you need

2. add a menu item in the Menu.php files and call the appropriate forms in Invoke.php (note that this is becoming significanly simpler in 2.1 and no core hacks will be required). alternatively you could also do what you want as a drupal module (and call civicrm api's / BAO's directly)

3. You should look at the code in CRM/Contact/Page/View/*.php and get an idea of how we retrieve various part of contact related data

4. ping us on irc if you need any help or get stuck at any stage

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: Customizing the contact dashboard
May 25, 2008, 11:16:14 pm
Thanks for the suggestion. I'll dig into that direction (or suggest the client to simplify that stuff and stick to what exists)
-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 (Moderator: Donald Lobo) »
  • Customizing the contact dashboard

This forum was archived on 2017-11-26.