Upgrade Your Drupal Skills

We trained 1,000+ Drupal Developers over the last decade.

See Advanced Courses NAH, I know Enough

Editorial workflows in Drupal 8: easy creation & management

Parent Feed: 

Streamlining the content creation and approval processes is necessary on many websites. Editorial workflows in Drupal 8 are easy to create and manage. This is achieved by the Content Moderation and Workflows modules.

These modules are Drupal 8’s innovation — they have appeared in the core and reached stability during the time between the introduction of Drupal 8.2 and Drupal 8.5. So welcome on this tour of creating and managing editorial workflows with them!

Drupal 8 editorial workflows with Content Moderation in a nutshell

By default, Drupal offers you the “Published” and “Unpublished” states for content, as well as a system of permissions for particular roles to manage it. However, with the Content Moderation and Workflows modules, the process gets much more advanced.

With them, you, out-of-box, have an editorial workflow that has such content states as “Draft,” “Published,” and “Archived”, as well as configurable transitions between them. Transitions look like “Publish” (move from Draft to Published), “Archive” (move from Published to Archived), and so on.

The workflow can be customized to your liking. This is achieved by adding custom content states (like “First edit”, “Second edit,” “Needs review,” “Needs work,” or any other) and creating the appropriate transitions.

An important benefit is that you can have a published version of content available to visitors, and at the same time have a working copy to review or edit. The content revisions are stored in the database.

You are also able to create multiple content workflows and apply each to a specific content type. And, of course, granular content moderation permissions are available.

Our Drupal development team will be happy to help you create the content moderation workflows to meet your organizations’ needs.

A closer look at managing editorial workflows in Drupal 8

Enabling the modules

It begins with enabling the Content Moderation and Workflows modules on the Extend tab.

  • The Workflows module provides a UI and an API for managing the states and transitions between them. The states and transitions are supplied by other modules (in our case, Content Moderation).
  • The Content Moderation module provides the content states and transitions for editorial workflows.

Enabling modules for editorial workflows in Drupal 8

As soon as the two modules are enabled, we see the built-in “Editorial” workflow in Configuration — Workflow — Workflows.

Built-in editorial workflow in Drupal 8

Managing the states and transitions

We see states and transitions listed and provided with the options to “Add a new state” and “Add a new transition.”

Managing states and transitions in Drupal 8 editorial workflows

The transitions should be named clearly, with the use of verbs. They should show from which state and to which state they lead. In this example, the “Restore to Draft” transition restores the content from Archived to Draft:

Transition between states in Drupal 8 content workflows

Applying the workflow to specific content types

Our workflow can be applied to particular content types, custom block types, or media types (the latter is true if you have the Media module enabled). So you can have different editorial workflows for articles, news, blog posts, photos, videos, and so on.

Applying Drupal 8 editorial workflows to content types

Setting content workflow permissions

It’s important to make sure that all workflow participants have the necessary permissions. This is configured on the People — Permissions tab. The appropriate roles like Author, Editor, and so on, can be created on your website according to your workflow needs.

The permissions are in the “Content Moderation” section and many of them are in the “Node” section. Both thesesections should be carefully checked.

For example, the Author should be able to create new content, edit their own content, view their own unpublished content, have the permission to “Create New Draft” transition, and so on. The Editor should be able to restore content from draft to publish, view any unpublished content, and so on. Both should be able to view the latest version, view revisions, and revert revisions.

Permissions for content workflows in Drupal 8

With everything configured, your editorial workflow could look, for example, like this.

  • The author creates a draft and the editor checks it and transfers it to the published state.
  • The author then suddenly decides to change something and edits this piece of content. The edited copy is saved as draft and is seen to the Author and the Editor in the “Latest version” tab of the content piece.
  • The editor reviews the content again.
  • All this time, the published version remains available all readers as before.

Let’s create an editorial workflow for your team

No matter how complex your desired workflows are, they can be configured with just Drupal 8 core features. Entrust our development team with creating editorial workflows for your website. Enjoy efficiency in content editing!

Author: 
Original Post: 

About Drupal Sun

Drupal Sun is an Evolving Web project. It allows you to:

  • Do full-text search on all the articles in Drupal Planet (thanks to Apache Solr)
  • Facet based on tags, author, or feed
  • Flip through articles quickly (with j/k or arrow keys) to find what you're interested in
  • View the entire article text inline, or in the context of the site where it was created

See the blog post at Evolving Web

Evolving Web