Drupal is a registered trademark of Dries Buytaert
drupal 11.3.7 Update released for Drupal core (11.3.7)! drupal 11.2.11 Update released for Drupal core (11.2.11)! drupal 10.6.7 Update released for Drupal core (10.6.7)! drupal 10.5.9 Update released for Drupal core (10.5.9)! cms 2.1.1 Update released for Drupal core (2.1.1)! drupal 11.3.6 Update released for Drupal core (11.3.6)! drupal 10.6.6 Update released for Drupal core (10.6.6)! cms 2.1.0 Update released for Drupal core (2.1.0)! bootstrap 8.x-3.40 Minor update available for theme bootstrap (8.x-3.40). menu_link_attributes 8.x-1.7 Minor update available for module menu_link_attributes (8.x-1.7). eca 3.1.1 Minor update available for module eca (3.1.1). layout_paragraphs 2.1.3 Minor update available for module layout_paragraphs (2.1.3). ai 1.3.3 Minor update available for module ai (1.3.3). ai 1.2.14 Minor update available for module ai (1.2.14). node_revision_delete 2.0.3 Minor update available for module node_revision_delete (2.0.3). moderated_content_bulk_publish 2.0.52 Minor update available for module moderated_content_bulk_publish (2.0.52). klaro 3.0.10 Minor update available for module klaro (3.0.10). klaro 3.0.9 Minor update available for module klaro (3.0.9). layout_paragraphs 2.1.2 Minor update available for module layout_paragraphs (2.1.2). geofield_map 11.1.8 Minor update available for module geofield_map (11.1.8).

Introduction

Out of the box, Drupal's content moderation module does not expose moderation state weight information to Views. This module provides field and sort handlers to facilitate this functionality.

This module can be used if you need to display Views results sorted by moderation state, but in a specific user-defined order. Simply set the order in which you want states to appear in the content moderation workflow configuration, then add the "Moderation state weight" sort criteria to your View.

How it works

Since Views sorts are executed by the database, moderation state weight information needs to be easily accessible from the database. Upon installation, this module creates a table containing moderation state weight information for each content moderation workflow. Each time a content moderation workflow is updated, the database table is also updated.

When adding one of the Views handlers provided by this module to a View, the handler will automatically join the moderation state weight table in the database, which allows the database to order the result set by moderation state weight.

Internal API usage

To fulfill the functionality delivered by this module, we rely on parts of Drupal that are likely considered to be part of its internal API; specifically, the content_moderation_state entity type and any related database structure and machine names. However, the risk should be minimal since we believe a backward incompatible change is unlikely.

Activity

Total releases
1
First release
Feb 2025
Latest release
1 year ago
Release cadence
Stability
100% stable

Releases

Version Type Release date
1.1.1 Stable Feb 10, 2025