Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Search API HTML Element Filter 1.0.7 Minor update available for module search_api_html_element_filter (1.0.7). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). Varbase Media Header 9.2.1 Minor update available for module varbase_media_header (9.2.1). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

This module allows you to sort content by its moderation state in Drupal Views. It exposes moderation state weight information to Views, enabling custom ordering of content based on the defined workflow. This is useful for displaying content in a specific, user-defined order within your site's moderation processes.

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
Releases (12 mo)
0 ▼ from 1
Maintenance
Dormant

Releases

Version Type Release date
1.1.1 Stable Feb 10, 2025