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) »
  • Contact Directory Using CiviCRM & Views2
Pages: [1]

Author Topic: Contact Directory Using CiviCRM & Views2  (Read 737 times)

dwatts3624

  • Guest
Contact Directory Using CiviCRM & Views2
October 18, 2010, 09:11:50 am
Hello,

I've been working on building a contact directory using Views2 in Drupal and have run up against some challenges.  Just for reference, I know there's a default CiviCRM directory but don't think it's going to offer the level of customization I need without some significant work.

So, here's my goal: display a list of "members" (contacts) within a list filtered by a specific group ID.  Then provide links to filter the list via an argument to children of that group.  The groups are setup as "members" and then chapters below them (eg. "Tampa", "South Florida", etc.).

I have the query setup properly in views to display the fields I want and filter the group by ID.  But, when I add the argument (preferably by group name) it doesn't work unless I remove the filter.

Here's the culprit (I think):
WHERE (civicrm_group.id = 2) AND (civicrm_group.title = 'Tampa Chapter')

The filter is the first one  and I've set an argument "Tampa Chapter" which is the second.  I've included a few contacts into both those groups.  Maybe my query is set wrong?  This seems like it should produce results since I do, in fact, have contacts where group ID = 2 and group title = "Tampa Chapter".

Thanks in advance for any assistance!

Danny

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Contact Directory Using CiviCRM & Views2
October 18, 2010, 10:19:18 am
Hi,

No idea about views integration, I tend to use a tiny wrapper module that fetch the params, initialise smarty and uses {crmAPI} to fetch the right contacts and display them the way I want from the templates.

This is an example of such a wrapper:
http://github.com/tttp/civiview

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 (Moderator: Donald Lobo) »
  • Contact Directory Using CiviCRM & Views2

This forum was archived on 2017-11-26.