I am trying to create a view based on fields from CiviCRM (civicrm.org), which has a pretty decent views module, but it appears that I can't use views_or in CiviCRM based views. I don't see Views Or as a filter option in my CiviCRM based view, but I can use it in other views.

I assume something would have to be changed at the code level to get views_or to work with CiviCRM based views. If someone can give me a push in the right direction, I would be happy to work on it. My questions are:

1. Does the change need to be made in the CiviCRM views module or the Views Or module?
2. What are the nature of the changes I would need to make?

Thanks for your help,
Q

Comments

qjensen’s picture

This module is very well written and very flexible. I was able to modify the data_alter function to reflect the data in the CiviCRM view and it fit right in and worked perfectly.

I wonder if there is a way to generalize this out so it would work with non Drupal data that has been exposed to views from a custom module like CiviCRM?

Piyush’s picture

@qjensen: Are you able to share what you did with the data_alter hook to get views_or working with CiviCRM?

Thanks!
Piyush

ZenLax’s picture

Subscribe - need CiviCRM view_or capability

netivajak’s picture

Used this for Civicrm Contacts by changing the views_or_views_data_alter in views_or.views.inc so that each instance of $cache['node'] is now $cache['civicrm_contact']

No longer works for any other type (eg Node) views after this change but I'm going to worry about that another day...

darren oh’s picture