
Of all the three CMS that integrate with CiviCRM, Drupal has received the most attention, and offers the most options when it comes to integration. This is in part due to the fact that the Drupal community is largely a developer community, and most (but definitley not all) of the CiviCRM developers are Drupal developers.
When thinking about website integration with Drupal, it is important to understand the concept of Drupal modules. It might help you to think of a module as an app which provides a certain bit of functionality. For example the calendar module allows you to display calendars on your website, and the fivestar module allows users to rate the content that they see on your website.
The Drupal distribution of CiviCRM comes with a number of Drupal modules which give you the ability to integrate CiviCRM with Drupal in various different ways. You can also download other drupal modules which offer different integrations from the Drupal website and other places.
This chapter outlines the main Drupal integration modules that come with CiviCRM and other common integration modules, including
The CiviGroup Roles Sync module allows administrators of Drupal Websites to streamline the user experience for donors and staff. The CiviGroup Roles Sync module allows you to:
Sigma Phi Epsilon Fraternity (SigEp) is one of the largest social and leadership development fraternities in the United States with over 240 chapters and serving 300,000 undergraduate members, alumni, staff, volunteers, and parents. With the wide range of different users served by SigEp's programs, extra care must be taken to ensure that certain information is accessible to people with specific roles within the organization.
Each SigEp chapter features a group of undergraduate members who manage the chapter's programming, leadership programs, and finances. This executive board includes a President and Director of Finance who are responsible for collecting dues and tracking academic standing of chapter members. While the President and Director of Finance need to keep track of when members are late on their dues payments the programming, events, and committee coordinators should never see another member's financial information.
In order to save their staff from having to grant the Drupal Role "Active Member" to a user each time he or she renews his or her membership and then remove the "Active Member" role if that user cancels his or her membership or allows his or her membership to expire, RBA uses CiviGroup Role Sync to grant the "Active Member" role to any user who is either a new or current member and any user who's membership has fallen into the grace period. Now when a user registers or renews his or her membership he or she will automatically be granted access to RBA's Member-Only web content.
This section covers what you need to think about before beginning to work with CiviGroupRole Sync.
You should spend some time assessing the different ways that different sorts of users interact with your website, being sure to ask yourself whether or not the user experience is dependent on specific organized groups, teams, committees, or task forces or on whether or not a contact meets a specific set of criteria, or if you should apply roles to users manually.
Your Drupal website allows you to create a series of different Roles. Your website administrators may grant roles to different users and grant each role the permission to perform a certain series of tasks (view, edit, delete, and administer) or access a certain set of information (CiviCRM Contacts, CiviMail, CiviEvents, Drupal Users, specific content types, etc.)
For more information on Drupal Roles, please read the documentation on Drupal Roles at Drupal.org:
Drupal permissions settings allow you to decide what task a specific Role can perform or what information a certain Role has access to. Drupal permissions determine how much access a certain type of user has to configure modules, view, create, edit, or change types of content, users, or CiviCRM Contact information.
For more information on Drupal Permission settings, please read the documentation on Drupal Permissions at Drupal.org:
Assigning permissions and users to roles http://drupal.org/node/22278
For more information on CiviCRM permissions in Drupal, please see the CiviCRM Drupal Permissions section.
There are several Drupal Modules that determine what Drupal Roles have access to which types of content in your Drupal website. This can be based on Drupal taxonomies, by selecting access to specific nodes, settings on a specific views, pages, or panels, or based on certain contexts or rules. A few of the most common modules used for controlling access to content or include options for controlling content based on Drupal Roles are:
You should have a full understanding of CiviCRM Groups, including how to create, edit, and add and remove contacts to both Groups and Smart Groups. You can learn more about Groups by reviewing the GROUPS AND TAGS section under the ORGANIZING YOUR DATA chapter.
Before using CiviGroup Roles Sync module you should have the following prepared:
When determining what Groups and what Drupal Roles you should create it is important to remember that multiple Group Types may grant the same Drupal Role and each Group can be used to grant multiple Drupal roles.
For example: The Retail Bakers Association of America has five different membership types: Corporate Sponsor, Bakery, Individual, Student, and Retired Bakery. Having any one of the five Membership Types will grant a user the "Active Member" Drupal Role that gives access to the member-only content. In addition to this, users with the Corporate Sponsor Membership Type should have access to additional exclusive content. RBA decides calls the Drupal role used to access this additional exclusive content "Corporate Member" and user with the Corporate Sponsor Membership Type will be granted the "Corporate Member" role in addition to the "Active Member" role.
You can always edit or delete existing association rules.
The CiviMember Roles Sync module allows administrators of Drupal Websites to streamline the user experience for organization members. The CiviMember Roles Sync module allows you to:
The Retail Baker's Association of America (RBA) connects bakery suppliers and owners across the country to foster a community that encourages exchange of business and industry information, networking, mentoring, and business opportunities, and establish industry standards through certification, research, and school programs.
Visitors to their website fall into three different user experiences:
In order to save their staff from having to grant the Drupal Role "Active Member" to a user each time he or she renews his or her membership and then remove the "Active Member" role if that user cancels his or her membership or allows his or her membership to expire, RBA uses CiviMember Role Sync to grant the "Active Member" role to any user who is either a new or current member and any user who's membership has fallen into the grace period. Now when a user registers or renews his or her membership he or she will automatically be granted access to RBA's Member-Only web content.
This section covers what you need to think about before beginning to work with CiviMember Role Sync.
You should spend some time assessing the different ways that different sorts of users interact with your website, being sure to ask yourself whether or not the use case is dependent on your membership structure or dependent on the organization of committees, teams, and contacts meeting a specific set of criteria, or if your workflow simply does not warrant the use of CiviMember Role Sync at all.
Your Drupal website allows you to create a series of different Roles. Your website administrators may grant roles to different users and grant each role the permission to perform a certain series of tasks (view, edit, delete, and administer) or access a certain set of information (CiviCRM Contacts, CiviMail, CiviEvents, Drupal Users, specific content types, etc.)
For more information on Drupal Roles, please read the documentation on Drupal Roles at Drupal.org:
Drupal permissions settings allow you to decide what task a specific Role can perform or what information a certain Role has access to. Drupal permissions determine how much access a certain type of user has to configure modules, view, create, edit, or change types of content, users, or CiviCRM Contact information.
For more information on Drupal Permission settings, please read the documentation on Drupal Permissions at Drupal.org:
Assigning permissions and users to roles http://drupal.org/node/22278
For more information on CiviCRM permissions in Drupal, please see the CiviCRM Drupal Permissions section.
There are several Drupal Modules that determine what Drupal Roles have access to which types of content in your Drupal website. This can be based on Drupal taxonomies, by selecting access to specific nodes, settings on a specific views, pages, or panels, or based on certain contexts or rules. A few of the most common modules used for controlling access to content or include options for controlling content based on Drupal Roles are:
You should have a full understanding of CiviCRM Membership Types and CiviCRM Membership Statuses before you begin working with the CiviMember Role Sync module. You can learn more about the CiviMember component by reviewing the MEMBERSHIP chapter.
Before using CiviMember Roles Sync module you should have the following prepared:
When determining what Membership Types and what Drupal Roles you should create it is important to remember that multiple Membership Types may grant the same Drupal Role and each Membership Type can be used to grant multiple Drupal roles.
For example: The Retail Bakers Association of America has five different membership types: Corporate Sponsor, Bakery, Individual, Student, and Retired Bakery. Having any one of the five Membership Types will grant a user the "Active Member" Drupal Role that gives access to the member-only content. In addition to this, users with the Corporate Sponsor Membership Type should have access to additional exclusive content. RBA decides calls the Drupal role used to access this additional exclusive content "Corporate Member" and user with the Corporate Sponsor Membership Type will be granted the "Corporate Member" role in addition to the "Active Member" role.
You can always edit or delete existing association rules.
You can select several different options for when synchronization should occur by navigating to the CiviMember Role Sync Configure screen.
Be sure to click Save Configuration after making any changes.
Views is a powerful Drupal module that allows a vast array of search, input and display options for data within Drupal nodes and blocks. CiviCRM integrates with Drupal Views by allowing CiviCRM data to be shown within Views.
For instance, if you wanted to create a page called 'Partner Organizations' and display it publicly you could:
1. Select criteria for what Contact data will be displayed such as:
a. Organization contacts only
b. That are tagged 'Partner' in CiviCRM
c. That have a membership of status 'New' or 'Current'
2. Choose which data will be shown such as:
a. Organization name
b. State/Province
c. Website
d. Phone number
3. Choose to show the data in either table or paragraph format
4. Allow the public to filter the results themselves by State/Province
This is just a simple example, the possibilities of Drupal Views and CiviCRM are far reaching.
Adding CiviCRM support to Views takes a small bit of configuration. Views must be told where to look for CiviCRM data. Administer > System Settings > CMS Database Integration shows some code that must be copied and pasted into the Drupal settings.php file after (but not replacing) the existing database connection code. If you have trouble consider asking for help in the forums or hiring a consultant.
If you are using Custom Data sets in CiviCRM, anytime you add a new data set (not just a field) you must repeat the process by copying and pasting the CiviCRM database code for Views into settings.php again.
Views are located in the Structure section of the Drupal administrative menu. When you create a View, give it a name and select what kind of data you wish to show.
Generally speaking if your view is focused on Contacts (which most are) you will select Show: CiviCRM Contacts. If you wish to display details about other CiviCRM data such as events, relationships, contributions or activities there are additional options that might provide more data fields for those types.
After the View is created, edit the fields, filters, display and other configurations to show the data exactly how you'd prefer. Views does take some experimentation and/or training to get it right. Feel free to ask questions on the forums or hire a consultant if you become stuck.
This is a sample configuration using Views 3 in a Drupal 7 environment. Your View will probably be slightly different, but this gives you some examples to get started with.