Drupal Overview
Pantheon provides a module so that documents from Content Publisher can be displayed within a Drupal site.This module treats documents as Remote Entities which can be indexed in Search API (via Pantheon's integration module) and then intermixed with Drupal's regular content.
Like any other piece of content in Drupal, a document from Content Publisher is displayed on its own path using its ID for internal routing. It can also be referenced and rendered using an entity reference field from other pieces of content.
Drupal is a Content Management System that uses the content of "entities" to model much of its data. In Drupal, there are different entity types for concepts like Users, Files, Taxonomy Terms, and generic content (Nodes). Underneath an entity type are separate "bundles" that separate subconcepts. A music-focused website might represent songs and albums as their separate bundles of the Node entity type. Those content types could then reference Genres of music which might be represented as a bundle of the Taxonomy Term entity type.
The Content Publisher module creates a new entity type for documents from Content Publisher. There is a 1:1 mapping between a Collection in Content Publisher and a bundle within the entity type. This bundling allows for additional Drupal fields to be added to Drupal's representation of the content.
Drupal does not permanently store all of the content from Content Publisher. Instead, the full content is stored remotely and fetched from the Content Publisher API. Content is cached in Drupal and indexed in Search API so that it can be rendered, listed, and searched quickly. This approach to content from Google Docs is similar to the way Drupal sites commonly treat YouTube videos where the IDs of YouTube videos are permanently stored in Drupal's database, but the HTML to embed a video is regenerated (and the video file itself certainly isn't stored within Drupal).
Upon installing the Content Publisher and Search API Pantheon modules a Search API index is automatically created that will index documents from Content Publisher.
Depending on your use case, you may want your Search API index to intermix indexing of these entities with Content entities so that you can produce listings in Views module of both types of entities.
Usage of Pathauto with Content Publisher is recommended but not strictly required.
Pathauto is the ubiquitous contrib (not in Drupal core) module that leverages Drupal Core's path module to automatically generate friendlier URL paths.
- Internally Drupal might track the "About Us" piece of content with the route /node/123
- With the Path module, a Drupal user can manually create an "alias" that maps https://example/about-us and https://example.com/node/123
- While not in Drupal Core, Pathauto is used in most all professional Drupal sites for ability to create patterns of aliases so that for any given content type (like bio pages) the title of the piece of content ("Josh Koenig") automatically creates a path alias like /team/josh-koenig.
We recommend using the tokens from Content Publisher's metadata to construct similar paths. For that pattern of using a Collection in Content Publisher to control bio pages for a company's employees, the Pathauto pattern might look like this: