Plugin for integrating Content Views with CiviCRM using the CiviCRM Data Processor as the data source.
CiviCRM Data Processor must be installed in the CiviCRM site to use this integration with WordPress and CiviCRM.
Content Views plugin must be installed in WordPress.
- Select your data sources
- Add an api output
- Select the fields, must include a field named id (this field won't be displayed).
- Select the filters - uncheck the exposed flag if you don't want it to be a live filter.
- (optional) set default value for filters
- order the fields and filters in the way you want
- save it
Then, you can go to content views and select civicrm content type. You will find it under the Data Processor dropdown. Preview it!
Content Views Pro is not required for this plugin to function. Content Views Pro provides a "live filters" feature in Content Views. If you want to use this feature then we recommend purchasing a Content Views Pro subscription.
The following patch patches/filter.patch needs to be applied to the Content Views plugin to then enable the CiviCRM options to be shown in the Filter Settings tab when using Content Views Pro.
- add a filter to the Data Processor
- the filter field is contact id
- give whatever the title you want
- change the name to contact_name_search
- save it
The live filter only display filters with exposed to user
and not required
.
One case to use a filter with both exposed to user
and required
is a filter for current contact id.
To control the display of fields you can modify the system name for each field in the data processor.
Set the extra options by appending _cvc_XX
to the field name:
r
: HREF: TODO How does this work?h
: Hide the field label.l
: Display a multivalue field as a HTML list.i
: User Contact ID: TODO How does this work?s
: Contact Name search: TODO How does this work?
- To display a list:
field_name_cvc_l
- Check the href link and hide label:
field_name_cvc_rh
field_name
orfield_name_cvc_
for empty option
- Create a field for contact display name.
- The default system name is
display_name
. - To display without label change the system name to:
display_name_cvc_h