Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Views moderation state weights

Security covered Under active development 1,851 sites

Part of the Views ecosystem · 280 projects

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.

Drupal 10–11

Ask your assistant about Views moderation state weights

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

  • content_moderation Drupal core
  • views Drupal core
  • workflows Drupal core

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
7
Tracked since
Apr 2023
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 1
Maintenance
Dormant

Release Timeline

Releases

Version Type Core PHP Release date
1.1.1 Stable 10–11 Feb 10, 2025
1.1.0 Stable 10–11 PHP 8.1 Jun 10, 2024
1.2.x-dev Dev 10–11 PHP 8.1 Jun 10, 2024
1.0.0 Stable 9–10 PHP 8.1 Aug 16, 2023
1.0.0-alpha1 Pre-release 9–10 PHP 8.1 Apr 13, 2023
1.1.x-dev Dev 10–11 PHP 8.1 Apr 13, 2023
1.0.x-dev Dev 9–10 PHP 8.1 Apr 6, 2023