Sneak peak at the DraggableViews module

DraggableViews gives you the ability to create a table view and order the rows by dragging them to your desired order. The module is in heavy development and we’ll be using the dev branch because it has the most bug fixes.

Install the module

First download (make sure you use the 6.x-3.x-dev branch) and enable the module also make sure you have views enabled.

Create a view

Go to the views page at Administer >> Site building >> Views and click on Addto create a new view.

draggable_fig1.jpg

Add a new page display and add a few fields also make sure you addDraggableviews: Order field and move that field to the front.

draggable_fig2.jpg

Over to the right in the sort criteria add Draggableviews: Order and order by Ascending.

draggable_fig3.jpg

Next thing we’ll do is set the style to display a Draggable Table.

draggable_fig4.jpg

Now we have to edit the settings of the style by click on the cog wheel.

draggable_fig5.jpg

Scroll down to the Style options: Draggable Table Settings: section and select “order” from the field select box and tick the “Show input fields?”

draggable_fig6.jpg

Scroll to the bottom and save the form.

Go create some test nodes and then go to your newly create views page to check out the table. If you get a blank page with just a save button simply clear your cache and that should fix it.

draggable_fig7.jpg

You’ll notice that you can still see the weight select boxes.draggable_fig8.jpg

This can be easily fixed by adding some extra css to your theme.

table.tabledrag-processed tr.draggable select.form-select {
  display: none;
}

It should then look like this after you have added the css.

draggable_fig9.jpg

Important thing to remember is that this module is still in development so expect some bugs. Give it a go it’s an awesome module.

If you have any problems or feedback please leave a comment.