This module provides an additional sort for FieldAPI fields, which sorts by whether the field is empty or not. This allows empty (i.e. NULL) values in fields to be sorted last.
This module has for motivation the following problem:
- You have a view listing nodes.
- These nodes have a field on them, 'field_foo'.
- You want to sort the view by this field, ascending.
- Some nodes have nothing in this field.
- Because of the way SQL sorting works, the nodes with no value are at the top of the list.
A common use case for this is using Draggable Views and a numeric weight field to order nodes. New nodes will receive a NULL value in the field, and so will appear at the top without this module's sort handler.
In combination with the regular sort, this can be used to place empty values at the end of the ascending results, or at the top of descending results.
Project information
Minimally maintained
Maintainers monitor issues, but fast responses are not guaranteed.Maintenance fixes only
Considered feature-complete by its maintainers.2,055 sites report using this module
- Created by joachim on , updated
Stable releases for this project are covered by the security advisory policy.
Look for the shield icon below.
Releases
8.x-1.3
released 12 May 2024
Works with Drupal: ^8 || ^9 || ^10 || ^11
Drupal 11 Support
Install:
Development version: 8.x-1.x-dev updated 12 May 2024 at 18:29 UTC


