Introduction
Managing content efficiently is crucial for creating seamless digital experiences. The Workflows and Content Moderation modules empower editors to tailor editorial processes, ensuring content moves smoothly from draft to publication.
By defining custom states like "Draft," "Ready for Review," and "Published," these core modules allow for precise control over content management. Whether you're handling complex editorial needs or simple moderation tasks, Drupal 10’s built-in tools make it easier to deliver consistent, high-quality content.
Both of these modules are part of Drupal core, so they are safe for use in production environments to create engaging digital experiences.
How Workflows And Content Moderation Modules Enhance Your Drupal Site
Keep reading to learn more about the Workflows and Content Moderation modules in Drupal.
Workflows
The Workflows module introduces one or more workflows, which are structured as a series of states and transitions.
- The state of the Workflows module represents a specific status in which a content can be at any given time. For example, a content node can exist in a published state or an unpublished state.
- The transition of the Workflows module signifies the process of moving from one state to another.
In short, the Workflows module acts like a traffic light system. It sets up different stages, each with its own rules for moving between them.
To view a list of currently configured workflows, access the Manage administration menu and navigate to “Configuration > Workflows (admin/config/workflow/Workflows).”
This configuration page displays all existing workflows and also has the option to create a new workflow.
Adding A Workflow In Drupal
Editors can use the Content Moderation module to attach a workflow to an entity type or bundle. Workflows Field, on the other hand, provides a field that can be incorporated into an entity type for selecting a state within a workflow.
The workflow type can also cover aspects such as default states, the initial state, and additional configuration for states, transitions, or the workflow.
In the absence of the Content Moderation module or another module that uses workflows, users will see a message during installation asking for a module that implements a workflow type.
Content Moderation
The Content Moderation module allows editors to attach a workflow to an entity type or bundle, provided the entity type supports revisions. If bundles are supported by the entity type, it's possible to assign different workflows to each bundle. Otherwise, only one workflow per entity type is feasible.
It's important to note that while workflows provides the core mechanism, it doesn't control how it should be utilized to manage the state of an entity. Content Moderation completes this process by providing:
- The Workflow Type Plugin that can be integrated with the Revision API.
- Storage for individual states of content entities.
- Configuration defining which bundles should have content moderation applied.
- Permissions controlling who can execute various transitions when applied to content.
For example, editors can utilize workflows with nodes (entity type) and attach them to different content types (bundles) like blog_post or page. To understand how content moderation works, editors need to know about "published" and "default revisions" for content.
Understanding Published States And Default Revisions In Content Moderation
Without additional modules enabled, content entities within a Digital Experience Platform (DXP) support a published/unpublished state. The core Node module uses this state to determine viewing permissions for the content. For example, all site visitors can view published content, while only administrators can access unpublished content.
Content entities also support revision tracking. Drupal stores older revisions as content is revised, enabling comparison or reversion at a later point. The default revision is the one currently in the published state. The version users see this revision by default when navigating to the page.
The workflow type within Content Moderation takes control over all these core features. When defining a new state, editors can choose whether that state corresponds to a published or unpublished status. As content moves from one state to another, its published status automatically aligns with the current state.
A content state can be set as the default revision, meaning the entity will default to this state when moved. If the state is marked as "Published," it automatically becomes the default revision as well.
How To Create A Seamless Publishing Process With Drupal
Organizations can integrate the Workflows and Content Moderation modules to implement content customizations and ensure the proper implementation of editorial rules.
By default, Drupal offers a basic workflow where content is either published or unpublished. But for more complex processes, it is necessary to integrate Workflows and Content Moderation.
For example, consider the following workflow implemented on a website for producing content before it's publicly available:
- Draft: Content is initially created by a Subject-Matter Expert (SME), creating the core content.
- Technical Review: Another SME, often from the community, examines the draft for accuracy.
- Revisions: Adjustments are made based on feedback, including adding visuals and refining formatting.
- Copy Editing: Content undergoes a thorough review to ensure it aligns with the established style guide.
- Final Review: A final check is conducted to verify links, titles, and metadata accuracy.
- Published: The tutorial is then officially published for members' access.
In the above workflow, different individuals are assigned to various stages of this process, and certain transitions necessitate approval before proceeding. For example, transitioning from copy editing to final review requires approval from a designated copy editor.
By using the Workflows and Content Moderation modules within Drupal, organizations can seamlessly execute this publishing process.
Permissions In Workflows And Content Moderation
In terms of permissions, the Workflows module defines only one permission, Administer Workflows. This grants full permission to create and edit workflows.
Content Moderation, on the other hand, introduces several permissions:
- View Any Unpublished Content: Enables content moderators to see unpublished content and potentially advance it to the next state.
- View The Latest Version: Allows users to view newer revisions. This permission requires either Content Moderation’s "View any unpublished content" or the Node module's "View own unpublished content" permission.
- Content Moderation: Sets rules for each step in a workflow. For example, the "Editorial workflow: Use Archive Transition" permission allows specific users to move items from published to archived in the editorial workflow. This capability is valuable for different moderators responsible for moving content between states.
How Axelerant Can Help Tailor Your Editorial Workflows In Drupal
Ready to transform your editorial workflows?
Contact Axelerant’s experts to learn how we can help tailor Drupal to your unique needs and help you achieve your content goals.
Gaurav Mahlawat, Drupal Contributor
Enthusiastic about mythology and historical books, Gaurav loves to surf memes on the internet and watch crime thrillers and superhero movies. His life’s essential value? Hard work.
Sayan Mallick, Marketing Assistant
A former professional e-sports player, passionate about anime and technology—that’s Sayan. He is an eccentric explorer who likes to read, play games, teach, and spend time with his pet dog, Buddy.
Leave us a comment