node_weight
888 sites
Security covered
Node Weight module provides a weight field that can be added to any content type. The weight field can then be used to provide customized sorting via views or custom query.
Requirements
This module requires no modules outside of Drupal core.
Install
Install the Node Weight module as you would normally install a contributed Drupal module.
Visit https://www.drupal.org/node/1897420 for further information.
Can also be installed via composer:
composer require drupal/node_weight
drush en node_weight
Features
- Configure/enable node weights for certain content types.
- Table-drag interface to manage node ordering.
- Node weight can also be updated on node add/edit forms.
- Supports translatable node weight field. Store weight per node translation.
- Leverages Batch API to update node weights.
Configuration
- Navigate to Administration > Extend and enable the Node Weight module.
- Navigate to Structure > Node Weights.
- Enable Node Weight for chosen node types.
- Navigate to Structure > Node Weights > Content Type
- Arrange nodes in desired order.
- Save changes.
- Use field_node_weight in Views Sort Criteria or any other entities to sort content.
It is also possible to set weight on content edit form using the node weight field.