DraggableViews
..makes views draggable
The DraggableViews module can be used to organize simple lists and complex structures via drag n' drop. The configuration is quite easy as you just have to access the style-plugin settings.
If you want it QUICK
- Navigate to the edit-page of an existing view.
- Add the field "Draggableviews: Order" at the Fields section.
- Now change the Style-plugin at the Basic settings section to Draggable Table and enter the Style plugin settings.
- Scroll down to the Draggable Table settings and choose the Order field you added just before. Choose "Native" handler.
- Save the settings. You'll be prompted to sort the view by the Order field. Save the view and you're done.
Simple lists
See "If you want it QUICK".
Hierarchies
If you want to build hierarchies you have to set the parent field. Use "Draggableviews: Parent" and choose "Native" handler if no third-party modules tells you something else. The maximum hierarchy depth can be specified at Define the depth limit.
What you should be aware of
- Don't rely on the live preview. Commonly its output differs from the actual output.
- Using paging for large views with hierarchies can result in dramatic loss of performance because the view needs to be reloaded one to three times in order to display all relevant nodes. Actually this already takes effect when Items to display (Basic settings) are limited.
Third-party modules can implement their own handlers to save the structure information where ever they want. Always use "Native" handler if you don't use a third-party module that tells you something else. The fields "Draggableviews: Order" and "Draggableviews: Parent" (use both in combination with native handler only) are unique for each view but not unique for different displays of the same view.
Additional settings
- Show input fields?: You can decide whether order input fields (order, parent) should be visible or not (If javascript is disabled all fields will be visible anyway).
- Define the depth limit: You can constrict the user in building hierarchies. -1: Unrestricted. 0: No hierarchies allowed. 1: Only one hierarchy level allowed. 2: Only two hierarchy.....
- Node type: You can define certain node-types to be "root" or "leaf". "Root" nodes cannot be subordinated. "Leaf" nodes cannot have child nodes. (this options will only be shown if the views base table is "node")
- Show expand Links: If checked little blue triangular icons will be shown next to the first field of a parent row. The expand/collapse state will be saved after hitting the "Save" button.
- Default is collapsed: Self-explaining..
- Unique for each user: The user-ID will be used to store/read the expand/collapse states from/to the database.
- How many rows should be displayed of the previous/next page: This setting makes it possible to drag a node (or term, user, etc.) from one page to another. (only makes sense if Items to display are restricted)
- The user cannot rearrange nodes (locked): No drag handles will be shown. Rearranging will not be possible but indentation of subordinated nodes (or terms, user, etc.) will be themed.
- Behavior of new nodes: Self-explaining..
Native handler settings
- Use arguments as well as view ID to order nodes: The views argument will be used to read/write order/parent values to/from the database.
If any display uses arguments (and defines the "DraggableViews: Order" field; Native handler assumed) all displays (non-"Draggable Table"-style-plugins) will use arguments in their queries too (except they tell us explicitly something else). See #565146: Defined order not respected when Style different than Draggable Table

where are the tutorials?
please? I can't get it to work, and I feel really stooopid...
they're back
Apologies - apparently the tutorials went missing during the v5-v6 upgrade. However, the current handbook pages are written for 6.x-3.1 only - there's a brief install guide included in the README.txt instructions for the current -dev version.
Still need help
All the picture examples in the tutorial are broken.
Also if anyone could better explain the use of the Parent field it would be greatly appreciated. I've worked out using the order field as the module gives a decent explaination of how that works. But adding in Parent functionality keeps resulting in a lot of errors.
Right now my scenario is this:
Basic Settings: Draggable Table - Style Option: Order field, Native handler; Parent field, native handler (everything else default)
Fields - Node Title (first); Dragg Order: Order; Dragg Parent: Parent; Content
Sort Criteria - Dragg Order: asc
Filter: Node Type; Published
Without the Parent field selected in the Style:Draggable Table settings everything works fine. But if I add it in then the page seems to work as the items are dragable on a parent and order basis but I have a lot of warning errors. Any help is appreciated. I'm guessing I have a basic setting wrong somewhere but the documentation is very sparse on any of this.
getting it to work
I couldn't get it to work either - at first, but then I got it working after disabling the DraggableViews CCK Implementation module (I hadn't set up CCK fields so I guess the query wasn't returning any results!). Hope that helps.
I felt the same way!
I couldn't get it to work, spent a couple of frustrated nights on it... I finally got it work! A lot of errors along the way but I finally got it work... here are my settings:
1. Enable both the DraggableViews & DraggableViews CCK Implementation
2. Go into the View that you want to make Draggable.
(Now there's 2 ways to do this, one using CCK and one not)
Native Way.
3. +Fields, -> Group: DraggableViews -> DraggableViews: Order (Add an 'Order' field)
4. Basic Settings -> Style -> Draggable Table
5. Basic Settings -> Row Style -> Fields (this is where I messed up, I had this to Node when it should of been Fields)
Now under the Draggable Table Settings
6. Make sure 'Order' Field is Sortable and is the Default Sort
7. Change 'Order Field' from none to 'Order' with Handler 'Native'
Save
Now for the "Sort criteria"
8. +Draggableviews: Order -> ASC
And that should do it!
To add a Parent Hierarchy, you will just
1. +Fields->DraggableViews: Parent
2. Under Draggable Table settings, Make sure Parent: is 'Parent' and Handler is 'Native'
To use CCK Fields instead of Native
1. Add a 'Numeric' Field (For the 'Order' field)
2. Add a 'Node Reference' Field (For the 'Parent' field)
3. Then under Draggable Table settings, for Handler change it from 'Native' to 'CCK'
4. in 'Sort Criteria' +Content: Order (not the DraggableViews Native field, but the CCK Content field)
Hope this works for you!
http://img39.imageshack.us/img39/4467/draggablviews.jpg <-- Screen shot of settings for 'Native' none CCK
Also thanks to the Project manager and original contributors, this Module Rocks!
Wealth Programming
Numeric is Integer in CCK
Numeric is Integer in CCK section. Yes it works!
Thanks
Thanks :)
This Screenshot Setup Doesn't Work
The SQL pulls all of my data fine, sorted correctly. My Row Style is set to 'Fields'. I get an empty view with the "save" button.
http://img44.imageshack.us/img44/2189/dragss.gif
SELECT node.nid AS nid, node.title AS node_title,draggableviews_structure0.value AS draggableviews_structure0_value,
draggableviews_structure1.value AS draggableviews_structure1_value
FROM node node LEFT JOIN draggableviews_structure draggableviews_structure0 ON node.nid = draggableviews_structure0.nid
AND (draggableviews_structure0.delta = 0
AND draggableviews_structure0.vid = 4) LEFT JOIN draggableviews_structure draggableviews_structure1 ON node.nid = draggableviews_structure1.nid
AND (draggableviews_structure1.delta = 1
AND draggableviews_structure1.vid = 4)
ORDER BY draggableviews_structure0_value ASC
Bug fixed
see #541130: Theme registery issues
Can't reorder
Hi,
I follow all steps, my view was working and draggable, but after testing some options (like locking the hierarchy), I can't now reorder my nodes.
Even if I start a new view from scratch I heve the same pb!
Any ideas .
Thanks
Ad.
short tags
This module won't work on our server because it doesn't support short PHP open tags. You should really change the module to use <?php open tags.
Fixed since August 25th
Fixed since August 25th.
http://drupal.org/cvs?commit=202556
problem
* Display "playlist display": Draggableviews: You must sort by DraggableViews: Order ascending as the first sort criteria to display the structure correctly.
* Display "favorites page": Draggableviews: You must sort by DraggableViews: Order ascending as the first sort criteria to display the structure correctly.
i cant get this to work, please help me