Drupal Module for PCC Integration
PCX Connect allows Drupal integration with multiple PCC Sites. As a pre-requisite, we need the following:
-
PCC Site ID & Token (Refer to Managing PCC Sites to know more about how to create a PCC site or access an existing site)
-
Google Drive Integrated with Pantheon Content Cloud (Refer to Content Creation Guide to connect Google with PCC Site)
PCC Sites are managed by PCC Cli. Refer to Pantheon Developer Guide to
setup pcc-cli
and then we can create PCC Site(s).
-
Create a PCC Site using
pcc-cli
to get the site ID:pcc site create --url mydomain.com
And PCC Site Token as:
pcc token create
More details here: Pantheon Guide | PCC Variables
-
Once we have PCC Site ID & Token, we can create / manage Drupal PCC Site at
/admin/structure/pcc_sites
Note: For Reference, the PCX Connect module ships an example connected PCC Site.
Once the PCC Site is created and added in Drupal, we can display content from PCC Site (the connected Google Drive).
To create a listing of the content from PCC site, create a view to show PCC Site - Site Name
. We have the following
fields, filters, sorting and pagination available:
- ID
- Slug
- Title
- Content
- Snippet
- Tags
- Metadata
- Published Date
- Updated At
- Publishing Level
PCX Connect module also supports Metadata fields. Search for Metadata field, add the field, select one of the available metadata fields.
Following features are supported for views:
Module supports Views content filtering for Title
, Content
, Tags
fields for now. Additionally, usage is limited to
is equal to
operator while it corresponds to search docs using contains
operator via PCC API.
Module supports Views content sorting for Published Date
and Updated At
.
For now, the module supports Mini pager.
This can be achieved using contextual filters.
Following contextual filters are fully supported that can help in building individual content pages:
- Slug
- ID
PCX Connect module installs optionally pantheon_cloud_api
view that creates route /api/pantheoncloud/document/%
for
integration with Pantheon Content Cloud. This uses Publishing Level
contextual filter. Preview supports auto-refresh.
For integration with PCC Smart Components, please review and enable pcx_smart_components
submodule.
PCX Connect module by default would create PCC Site configuration for demo purposes. Additionally, View
blogs
and pantheon_cloud_api
are installed, to show a sample content listing page at /blogs
and also creates
individual pages (/blogs/{slug}
) for these blog contents.
And the pantheon_cloud_api
view is responsible for Live Preview feature.