Free Website Tips
Recent Twitter Posts
Clients Include




Some Magic Required: Getting DraggableViews to Work
How can you make the first first and the last last? Often clients need to order their Staff or Board Member or ... pages so that it appears in a specific order. It isn't usually a point of pride, rather it just makes sense for the board President to be listed first so people can tell who is in charge.
This seems like it would be easy, but the only out-of-the-box way to do it is have them enter in a number for each staff member and then sorting on that. Trouble is that is far from intuitive and leads to headaches like - "I already have entered 1 through 17 and now I need to add someone new in position 3, do I need to re-enter 3-17 as 4-18."
Fortunately, DraggableViews comes to our rescue! It is a super handy module that allows clients to drag-and-drop into the order they want. However, it can be a bit tricky to initially configure.
So, without further ado, here is my cheatsheet for setting up DraggableViews for this sort of situation:
- Download DraggableViews (http://drupal.org/project/draggableviews)
- Enable both DraggableViews and DraggableViews CCK Handler (otherwise the "Save order" button won't do anything)
- Add the Weight field (using Number CCK module Integer field type) to your content type (and possibly populate it to prevent repeatedly getting "The structure was broken. It has been repaired." messages).
- Create your View and set the Sort to be your CCK Weight field Ascending.
- Change the view Style to "Draggable Table" and set the options there accordingly (choose CCK for handler).
Oh and remember when you're done to set the View access to only specific roles!
Running into more issues? These and more covered at http://drupal.org/node/393530
References:



