Drupal/CiviCRM Integration

Example Use Case

This example is a one event page which has tabs of many types of content and views attached which allows a anonymous user to view the info, see registered participants, register for the event via one webform which also automatically creates a contact, membership, active drupal user, and participant event registration to the event, logs in the user, and sets his user entered password via text field on the webform.

Using this method you can create easily customizable membership join, and event registration pages which leverage the full gauntlet of advanced Drupal 7 modules, and the easy of customizing the layout and style with css in the Drupal theme.

Understanding and Using Views Contexual Filters

Views Contextual Filters is a feature of the Views module which allows a Views to accept filtering from url, or other inputs.  This allows you to create lists that depend on conditional or user input.  There are many reasons why you may want to filter a list based on url input.  Take for example of a list of articles.  You may have many articles and wish to categorize them.  In the case of this website I'd like to be able to filter my article lists by the different Tags I give the articles.  I have several taxonomy terms, CiviCRM, Drupal, and Integration.

Easy JQuery Modificaiton of CiviCRM Forms

Have you ever wanted to modify a CiviCRM contribution or event registration page?  Taken a look at those Smarty templates?  Doesn't look pretty does it.

In the article I describe how to easily add JQuery/javascript to any form you want and modify the page.

First, and hardest of all, is create a basic CiviCRM extension.  There is a program that will generate a basic extension that integrates with CiviCRM but doesn't yet add functionality.

Simple Rule Example Using CiviCRM Entity

The new Drupal module CiviCRM Entity exposes 11 CiviCRM objects as Drupal Entities and provides rules support for these entities.  In this article I will demonstrate how to create a simple rule which creates a synced drupal user for the contact when the contact gets a membership.

This how-to assumes you have the Rules modules and the CiviCRM Entity module installed.

Create the rule:

Creating an Entity Reference View

The Entity Reference module is a useful Drupal 7 module and can be used to reference any entity from a field added to any other entity.  For example, you can add a entity reference field to the Basic Page content type, which references taxonomy terms of vocabulary (bundle) tags.  When you are creating a page and want to reference a particular term, it may help the user to see a custom format for the terms.  By default the term name will be displayed for the terms that can be referenced.  It may be convenient for the user to have a more detailed descprition of the term to make a decision. 

Using Rules and Views Bulk Operations

In a previous article I described how to use the EVA and Entity Reference modules to create a simple reviews system for the Article content type.  To improve this system, it would be good if when an Article is deleted, that all the reviews that reference that Article are also deleted.

To do this we will use Rules, Conditional Rules, and Views Bulk Operations

Understanding Views Relationships

Source: http://drupal.org/node/1578586

Relationships are used to allow Views to bring in data that is associated with the data already available in the view. A comment view could, for example, use the relationship comment: content to tap into data about the node for each comment. A term view could use the relationship taxonomy: parent term to tap into data from the parent term of each listed term.

People comfortable with writing SQL queries will recognize the relationships as joins. You add, edit and delete relationships in the same way as filter, view fields and sort criteria by using the add button and its related menu.

Useful Field Modules

Field Formatter API

https://drupal.org/project/field_formatter_settings

The Field API in Drupal core lacks the ability for other modules to easily alter field formatter settings forms and the formatter summaries. This module is a small API provider for other modules since it's too late to get the hooks into core. This and the modules below give you much more flexibility with fields especially when used in combination with Display Suite.

EVA and Entity Reference Use Case How-to

This article describes the building of a practical example use case using modern Drupal 7 modules and site building techniques. I will show how to use Views, EVA, Fieldgroup, Entity Reference, Entity Reference Prepopulate, Display Suite modules to display content from multiple content types and other Drupal Entities on an article content type page. The goal is build a review system for the article content type.

Subscribe to Jackrabbithanna's Drupal and CiviCRM Blog RSS