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 »
  • Using Profiles (Moderator: Dave Greenberg) »
  • Can't manage to display CiviCRM profile in regular Drupal node
Pages: [1]

Author Topic: Can't manage to display CiviCRM profile in regular Drupal node  (Read 2202 times)

alextronic

  • I post occasionally
  • **
  • Posts: 57
  • Karma: 2
  • I do what I do
Can't manage to display CiviCRM profile in regular Drupal node
September 08, 2009, 03:51:28 pm
How can I do it into a regular node (e.g pag, story etc), I mean, outside a user's page?

I have tried so many ways. The last one was with profile_load_profile($user), but to no avail.

Please!
Thnx

dharmatech

  • I post frequently
  • ***
  • Posts: 280
  • Karma: 53
    • dharmatech.org
Re: Can't manage to display CiviCRM profile in regular Drupal node
September 08, 2009, 04:33:19 pm
Have you tried embedding the profile into a node? On the profile admin screen /civicrm/admin/uf/group?reset=1 you should see a link for "standalone form." You can copy and paste that HTML to any Drupal page/node. This is for profile's used as forms not for profile listings, however.

Hope this helps
Tony
http://dharmatech.org
oss@dharmatech.org
801.541.8671

alextronic

  • I post occasionally
  • **
  • Posts: 57
  • Karma: 2
  • I do what I do
Re: Can't manage to display CiviCRM profile in regular Drupal node
September 08, 2009, 04:44:28 pm
Thanks for the Reply!

Yes, I knew about the Standalone form, but I don't need to collect info, I need to display the currently logged in user's civiCRM profile (well, the only one that I have set up for users).

I have managed to do that in user-profile.tpl.php, but the same code:

Code: [Select]
<?php
unset($profile[t('summary')]);
foreach (
$profile AS $k => $v) {
  print 
$v;
}
?>

... does not work in a regular node. I know it's just my ignorance, but, Why?!

alextronic

  • I post occasionally
  • **
  • Posts: 57
  • Karma: 2
  • I do what I do
Re: Can't manage to display CiviCRM profile in regular Drupal node
September 10, 2009, 06:22:19 pm
http://drupal.org/node/47308 is such an old thread.

When I try the snippets there, the user gets logged out! After submitting changes to a node!

So weird.

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: Can't manage to display CiviCRM profile in regular Drupal node
September 11, 2009, 03:36:56 am
is this something that Views could help you with? Let's you display much of the civicrm data, and you can output as a block to insert in that page - maybe?
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

alextronic

  • I post occasionally
  • **
  • Posts: 57
  • Karma: 2
  • I do what I do
Re: Can't manage to display CiviCRM profile in regular Drupal node
September 11, 2009, 06:24:08 am
Quote from: peterd on September 11, 2009, 03:36:56 am
is this something that Views could help you with? Let's you display much of the civicrm data, and you can output as a block to insert in that page - maybe?

Yes, that's a good idea. Thank you.

EDIT. I also learned that, in order to let the user edit those CiviCRM profiles, you can use /user/1/edit/Name of the Profile
« Last Edit: September 14, 2009, 12:20:14 pm by alextronic »

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Profiles (Moderator: Dave Greenberg) »
  • Can't manage to display CiviCRM profile in regular Drupal node

This forum was archived on 2017-11-26.