Sorting posts with Weight and Views

Tech Notes

Often for one reason or another we need to sort a list of nodes arbitrarily. Here is a comparison list of modules to do the trick. Here is a recipe using Weight and Views. I've a Content type project that are the only nodes that need sorting.

  1. Install Weight and Views
  2. Enable Weight, Views and Views UI
  3. Create a new View admin/build/views/add
  4. Add a new display Add Display : Page
  5. Style : Weight Changer
  6. Page settings :
    1. Path : project/sort
  7. Fields :
    1. Node : Title
    2. Node : Edit link
    3. Weight : Weight
  8. Sort criteria :
    1. Weight : Weight (ascending)
    2. Node : Post date (descending)
  9. Filters :
    1. Node : Type = project
  10. Save it and browse to the page you set in Path

The patch contributed to Weight to allow this is written up here. http://www.zivtech.com/blog/drag-and-drop-content-ordering