This extension allows CiviCRM to make use of Drupal html content defined via the views module.
The extension is licensed under AGPL-3.0.
- PHP v7.2+
- CiviCRM 5.35+
- Drupal 8+
Learn more about installing CiviCRM extensions in the CiviCRM Sysadmin Guide.
Sysadmins and developers may download the .zip
file for this extension and
install it with the command-line tool cv.
cd <extension-dir>
cv dl viewstokens@https://github.com/blackflysolutions/viewstokens/archive/master.zip
Sysadmins and developers may clone the Git repo for this extension and install it with the command-line tool cv.
git clone https://github.com/blackflysolutions/viewstokens.git
cv en viewstokens
All Drupal views will be included in the token list. You can make use of an existing view, or (usually) create a view specifically to be included as a token. The token format is
{views.view_name__display_name}
The token will show up with the view name followed by the display label.
There are a few challenges which make this extension not useable yet.
- Themeing
The Drupal theme layer participates in the generating of views html.
For the most part, we don't want that - we want to be specific about which views templates get used.
Especially for mosaico content, for which we'd like to replicate the responsive email html.
Working on that now.
- Mosaico templates
To generate a list of content, we need a 'placeholder' kind of element in mosaico so it doesn't wrap it up in redundant html.
I've got the beginning of that in this extension, but it needs some work.