Draggable Views: A How To

Chris Wright
September 25, 2016
Laptop, notepad, mobile device, alcohol, and a mini-canon paperweight on a desk

DraggableViews: a HowTo

Drupal views are great! However, the order in which your content prints out isn’t as easy to control. You can sort ascending or descending based on the post date, the title, etc. But what if you had a specific order you wanted them to print out? With Draggableviews you can set the order your content will print out with an easy drag-and-drop gui. Setting draggable views up is a little complex, so let’s walk through the process.

Let’s assume you already have a view set up…

Setting up your Draggable Display

  1. Enable the module
  2. Navigate to your view
  3. Add a new Page to your view            
  4. Set a page source - I usually use something like /draggable-blog
  5. Set your format to Table
  6. Make sure your fields includes Content: Title
  7. Add DraggableViews: Content to your fields
  8. Add DraggableViews: Weight (ascending) to your sort criteria

Setting your original view to use your draggable order

  1. Navigate to your original view
  2. Add DraggableViews: Weight (ascending) to your sort criteria and remove the default sort criteria - (should be Post Date)
  3. You’ll be asked to Display Sort as: and you will select your View in the dropdown. In this case my view name is Test View:

Once you have all this setup, navigate to your /draggable page. Once you are on that page, you will see a list of your content with the draggable icon on the left side. Order them in the way you like and click save. Now your view is sorted in such a way that you can easily manage.