Drag-and-drop Content Ordering

Oct 7, 2008 - Posted by: Jody Hamilton

I recently wrote a views plugin for the weight module which allows the setup of views which are a drag-and-drop form for ordering nodes.

The weight module is a module which stores numeric values instead of the usual 1 or 0 for a node's sticky status, which allows admins to assign specific weights to nodes, controlling their position on the default drupal /node homepage, forum listings or other views which are ordered by sticky status. You choose which content types will be weight-enabled, and then when you edit those nodes you can assign a weight from a dropdown.

Zivtech has been collaborating here in Philadelphia with Bluecadet Interactive on a number of projects. Bluecadet does excellent Flash sites and I have been helping them set up Drupal for content management on these sites (which I will blog about shortly). One of their common needs is to allow administrators to manually set the order of content such as playlist items or photos in a gallery. Their needs are close to what nodequeue does but they don't want to manually add content to a queue and they wanted to customize the administrative experience. They liked the idea of using drag-and-drop to allow their admins to order content directly from an administration view. By persuading our friends at Bluecadet that true views integration would pay off in the long run as opposed to a quicker but inflexible site-specific solution, I got the pleasure of creating something of true value.

Using the new Views 2 API and Drupal 6's core drag and drop ability, I was able to extend weight module so that we can create drag and drop ordering forms using views. Moving functionality into views creates enormous power and possibility, as fans of views know well. Please help by reviewing or improving my patch to get this views integration included into weight module.[img_assist|nid=12791|title=viewsblog|desc=|link=none|align=left|width=499|height=227][img_assist|nid=12790|title=playlist|desc=|link=none|align=left|width=480|height=189]

Jody Hamilton
I am passionate about the quality of our work and I maintain high standards for my team. I am deeply committed to the projects I lead, typically coming up with solutions for them at all hours. I care... Read more


Send us a message

This question is for testing whether you are a human visitor and to prevent automated spam submissions.