Views Integration

Last updated on
30 April 2025

The Weight module includes a default view that is disabled by default. This view provides a table of node titles that can be reordered using a drag-and-drop interface. The view can be customized to meet your needs, or a new view can be created.

Drupal 8

Note that the 8.x-3.0 version requires 3 patches to work. They have been committed to the 8.x-3.x. The patches are in the following issue queues.

https://www.drupal.org/node/2671844
https://www.drupal.org/node/2687953
https://www.drupal.org/node/2671840

Add a "weight" field to your content type

First, you need to create a field of type weight in your content type you want to order.

Create a View

  • Add a weight field to your content type
  • Create a new view with a Page display (Usually called 'Re-order + your content type name' or similar)
  • To use drag-and-drop reordering, set the style to "Table"
  • Add a Title field to see which node you are re-ordering
  • Add a Weight Selector field to the view, but not as the first field
  • Sort the re-ordering View by Weight ASC (as well as any other views you want to re-order)
  • Ensure only appropriate roles have access to the view

Drupal 7.x-3.x

Create a View

  • Add a weight field to your content type
  • Create a new view with a Page display (Usually called 'Re-order + your content type name>' or similar)
  • To use drag-and-drop reordering, set the style to "Table"
  • Add a Title field to see which node you are re-ordering
  • Add a Weight Selector field (not the Weight field) to the view, but not as the first field
  • Sort the re-ordering View by Weight ASC (as well as any other views you want to re-order)
  • Ensure only appropriate roles have access to the view

Drupal 7.x-2.x

Create a View

  • Create a new view with a Page display
  • To use drag-and-drop reordering, set the style to "Table"
  • Add a Weight field to the view, but not as the first field
  • Sort the View by Weight ASC
  • Ensure only appropriate roles have access to the view

Handlers

The Weight module provides the following views handlers.

Field - Weight
The nodes weight
Filter - Weight
The nodes weight
Filter - Weight Enabled
Nodes that are weight enabled
Sort - Weight
The nodes weight

Drupal 6

Create a View

  • Create a new view with a Page display
  • Change the view style to "Weight Changer"
  • Add a Weight field to the view, but not as the first field
  • Sort the View by Weight ASC
  • Ensure only appropriate roles have access to the view
  • Handlers

    The Weight module provides the following views handlers.

    Field - Weight
    The nodes weight
    Filter - Weight
    The nodes weight
    Filter - Weighted Sticky
    Nodes that are sticky
    Sort - Weight
    The nodes weight

    Help improve this page

    Page status: Not set

    You can: