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 Drupal Modules (Moderator: Donald Lobo) »
  • Views 2 Argument Handling Code
Pages: [1]

Author Topic: Views 2 Argument Handling Code  (Read 1273 times)

jhofer

  • I’m new here
  • *
  • Posts: 23
  • Karma: 0
  • CiviCRM version: 3.x
  • CMS version: Drupal 6.x
  • MySQL version: 5.x
  • PHP version: 5.x
Views 2 Argument Handling Code
August 31, 2011, 10:21:21 pm
I'm looking for views argument handling code that will link a CiviCRM contact to a Drupal node.  The idea is that a Civi contact has a profile page (node).  The profile page (node) includes blocks that contain views of a corresponding Civi Contact.

For example.  An organization by the name of "Cultural Arts Center" has a profile page (a drupal content type) titled "Cultural Arts Center".  They also have a Civi Contact with a display name "Cultural Arts Center" .   I want their contact info and some custom fields from Civi (ie their mission) to show on their profile page.

I have used php views argument snippets that create dynamic views blocks displaying node fields by using Drupal's taxonomy structure - but since CiviCRM doesn't integrate with Drupal's taxonomy I can't use taxonomy terms to link node and the dynamic views blocks. 

The only thing I can think of is using a php snippet that checks the CiviCRM Display name against the  node title - if they are identical then the profile page would include the block of the corresponding CiviCRM contact data. 

Hope this makes sense?  Anyone?
« Last Edit: September 01, 2011, 07:26:24 am by jhofer »

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: Views 2 Argument Handling Code
August 31, 2011, 10:30:18 pm
looks like para 1 is unfinished - care to elaborate?
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

jhofer

  • I’m new here
  • *
  • Posts: 23
  • Karma: 0
  • CiviCRM version: 3.x
  • CMS version: Drupal 6.x
  • MySQL version: 5.x
  • PHP version: 5.x
Re: Views 2 Argument Handling Code
September 01, 2011, 07:21:36 am
oops, updated it (was posting quick before putting kids to bed!) - thanks...

jhofer

  • I’m new here
  • *
  • Posts: 23
  • Karma: 0
  • CiviCRM version: 3.x
  • CMS version: Drupal 6.x
  • MySQL version: 5.x
  • PHP version: 5.x
Re: Views 2 Argument Handling Code
September 03, 2011, 11:50:07 am
Seems like the CCK Reference Field may be the way to go... however it is restricted to looking up only individuals.

Probably a customization of this field to include Orgs?  http://civicrm.org/blogs/xavier/how-customise-contact-reference-custom-field

Unfortunately this kind of customization is beyond me.  I'm going to continue to explore Views Argument PHP snippets that will link Civi Contant content to the node...

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Drupal Modules (Moderator: Donald Lobo) »
  • Views 2 Argument Handling Code

This forum was archived on 2017-11-26.