Drupal Fields and CiviCRM Contact Pages
CiviCRM comes out of the box with custom field functionality, and supplies several useful field types. This is great, but what if I want to add data to my CiviCRM contacts that is not one of these field types? What to do? CiviCRM Entity to the rescue!
CiviCRM Entity is a Drupal module which exposes many CiviCRM entities as true Drupal entities. That means that almost any module that can use Drupal entities, can access and manipulate CiviCRM data, Drupal style. This includes many commonly used modules such as Views, Rules, Search API, Entityqueue, and many more.
The 2.x branch of CiviCRM Entity has added capability to add Drupal fields to CiviCRM entities. It exposing CiviCRM data as proper Drupal entities, and because of that, the full power of the Drupal Entity API can be leveraged in conjuction with your CiviCRM data.
So any field type, provided by either Drupal Core, or any contributed module can be attached to CiviCRM data and created, read, updated, or deleted with the corresponding CiviCRM record. Fields can be displayed in Views, used in Rules, indexed by Search API, and manipulated by all the rest.
This means that we can add YouTube videos, images, slideshows, audio, and WHATEVER to your CiviCRM Contact. Great news right?
Sure enough, and I'll do you one better. With CiviCRM Views on Contact Page, developed by Skvare, the Drupal field data can be displayed either on the contact summary page, or as a new tab on the contact page.
Did I tell you need to know zero code to do this? Its a site building task, and if you've added fields to a content type or created Views before, then is a simple matter.
Here's how.
First install CiviCRM Entity and CiviCRM Views on Contact Page and their dependencies Views and Entity API.
For this example, we're going to use the Drupal 7 Media module. This module and its many extension modules provide a media library with support for many video sites such as You Tube and Vimeo, images, audio. Additional modules can be used to augment the field display into slideshows, accordians, and other formats.
The methodolgy decribed in this article will work for any field type.