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 Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Public search results based on tags
Pages: [1]

Author Topic: Public search results based on tags  (Read 1089 times)

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Public search results based on tags
March 24, 2008, 12:12:42 pm
Hi,

I want to list contacts based on tags (one list per tag).

I've read this, and I have indeed a group "public contacts"
http://wiki.civicrm.org/confluence/display/CRMDOC/Creating+a+website+member+directory

But I want to have sub listings per tags (page with only public contacts tagged A, page 2 with only public contacts taged B...)

I have quite a lot of tags, that might be added, the ideal solution would be to pass the tag parameter on the url, but I can't seem to be able to do that (civicrm doesn't keep the params as get, but does some voodoo magic with a "qfKey").

I was thinking of creating a custom search (great feature), but can't have a public search result (without being authenticated). Is there a way of forcing that ? Or an easier way of doing it ?

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: Public search results based on tags
March 24, 2008, 02:07:15 pm

Have you tried using profiles and exposing tags there?

You can then potentially show a listing for the a specific tag by using

civicrm/profile/search?reset=1&force=1&nosearch=1&tag_id=XXX

I think that should work (or come pretty close to working). Can u give it a shot and we can chat on IRC about what needs to be tweaked if needed

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

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Public search results based on tags
March 24, 2008, 02:27:51 pm
The format for passing in a tag id and suppressing the search form is:

http://..../civicrm/profile?reset=1&force=1&gid=1&tag=4&search=0

(this lists contacts tagged with the civicrm_tag.id = 4)

This is "mostly" covered in the later sections of this page on the wiki:
http://wiki.civicrm.org/confluence/display/CRMDOC/Linking+Profiles

If you checked there and didn't find your answers - feel free to beef up / improve the page / examples.
« Last Edit: March 24, 2008, 02:29:50 pm by Dave Greenberg »
Protect your investment in CiviCRM by  becoming a Member!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Public search results based on tags

This forum was archived on 2017-11-26.