Drupal 8 Publishing Workflows and Content Moderation

Justin Toupin

We recently helped Media Matters for America redesign their website with Drupal 8. The new platform offers a ton of great improvements for MMFA’s editorial team, from custom HTML5 players for their massive media library (more than a petabyte of data!) to fine-tuned control over the way articles are shown in different contexts of the website (articles often use custom titles for the home page and other landing pages). Another great feature, new to the MMFA team as of Drupal 8, is content moderation. Here’s a quick breakdown of how to build custom workflows for easy content moderation in Drupal 8, plus a few thoughts on how to extend workflows for even more editorial control.

What Exactly is Content Moderation in Drupal 8?

Content moderation in Drupal 8 is a fairly simple concept: site admins can create and manage custom workflows for specific types of content. Workflows simply determine the various stages (or moderations states) used when creating content.

Within each workflow, site admins can manage two specific parts:

  • Moderation States (Draft, Published, Archived, etc.)
  • Moderation Transitions (moving from Draft to Published, Published to Archived, etc.)

Site admins can add whatever workflow states they need to suit their team’s unique editorial process. Do articles need to be reviewed by an editor? Add a “Review” state. Do they need an illustration from the design team? Add a “Design” state. And so on.

Further, site admins can tailor permissions to their teams’ needs, ensuring the right people have the right editorial access for only specific moderation states, or only to specific transitions. Maybe the design team shouldn’t be able to use the “Design to Published” transition, but should instead only use “Design to Review.” Maybe your editors need the flexibility to skip any state they want to, and go from “[Any moderation state] to Published.” All that is easy to configure, zero code necessary, right in the admin interface of Drupal 8.

What Drupal 8’s Content Moderation Is Not

Content moderation in Drupal 8 is not an inline collaboration tool or word processor. It doesn’t track changes the way modern word processors do (think Google Docs or MS Word), and it doesn’t provide any form of commenting in and of itself. Sure, it can be combined with other modules and features (comments, diff, revision logs, etc.) to offer some useful context around version changes. But it’s not a replacement for the kinds of collaboration tools built into modern document editing products.

In my opinion, that’s not a problem. We have plenty of tools for document editing and collaboration (again, Google Docs, Word). What those tools don’t offer is a high-level workflow management platform: a single place to find all content being created, to filter by moderation state, to bump along to the next step in the process, and so on. Content moderation in Drupal 8 provides exactly that. But the two are not mutually exclusive.

Getting Started with Content Moderation in Drupal 8

Setting up content moderation is simple.

  • First, install the Workflows module (included in Drupal core).
  • Second, install the Content Moderation module (also in Drupal core).
  • Go to Admin > Configuration > Workflows and click “Add Workflow.”
  • Give your new workflow a name (i.e. “Editorial” or “Blog Workflow”) and choose “Content Moderation” from the dropdown.
  • Customize your new workflow: add or edit states, transitions, etc. (Important: make sure you apply your workflow to the types of content you wish to use it for under the section “This Workflow Applies To”).
  • Go to Admin > People > Permissions and scroll down to “Content Moderation” to assign permissions for using specific transitions to user roles as appropriate.
  • Go to Admin > Content > Moderated Content to see a high level view of all your content being managed by various workflows.

Even More Control

Like so many other Drupal features, one of the most powerful aspects of the Content Moderation module is how it interacts with other systems. The specific moderation state for each piece of content is stored in a specially designated field, with all the properties and capabilities of other Drupal fields. Site builders and developers can leverage the moderation state to quickly create powerful behaviors. For example:

  • Using the Rules module, site builders can trigger configurable actions that fire when content is saved in a particular moderation state (on our own website, we use Rules to send messages and prompts via Slack).
  • Using the Conditional Fields module, site builders can configure fields to show or hide based on the moderations state (for example, only show the “Image” field on edit screens when a post is in the “Design” stage).
  • Using moderation state data stored in specific workflow fields, developers can add all kinds of advanced actions triggered by specific workflow transitions (See the Workflow Notifications module as an example).

Wrapping It Up

Drupal 8’s Content Moderation and Workflow modules provide a flexible toolkit for automating workflows and empowering your editorial team to collaborate more effectively. Rather than replacing your team’s existing tools (i.e. Word, Google Docs), workflows in Drupal 8 add an important additional layer for managing high-level status and pushing content through necessary stages. Media Matters is a great example: simple workflow tools help their newsroom run more effectively, without requiring their writers to abandon the tools familiar to them. If you’re thinking about how to automate your team’s editorial workflow and wondering if your CMS should play a role, we’d love to talk.


About the Author

Justin is CEO and founding partner at Aten. He started the company back in 2000 with a passion for technology and communications, a desire to do meaningful work, and an aspiration to help build a place where people love what they do.

Read More