Drag & Drop Sorting of Child Pages

by: Allan Thræn

Yet another small utility inspired by a customer. An editor came up to me and complained about the annoyance of setting sort-indexes manually to change the sort order or pages. Naturally I suggested the excellent EPiCode project ManageChildren - but this editor was really hooked onto the idea of doing drag and drop sorting.

Anyway, to make a long story short, a couple of quick google's and I found this javascript library on Tool-man.org and thus a plugin was born.

I made a simple EditPanel GuiPlugin, implemented ICustomPlugInLoader to make sure it only appeared on pages with child-pages, and added logic to set the new sort order. Once a list is sorted and posted back, it will set the Sort Order to "SortIndex" on the parent, and then set the index values on the children, starting with 2000 and incrementing with 1000 for every child. Then they are all saved. If they were published versions, they are also published again - otherwise just saved.

Download the plugin here (for EPiServer CMS 5 R2). To install, simply unzip in your EPiServer folder. Source is here (use this to compile to older versions of CMS 5).

If you want to see it in action, check out this screencast.

15 October 2008


Comments

  1. Nice one, is it possible to set your own interval, eg 10, 20, 30 instead of 1,2,3... ?
  2. Very Cool Allan
  3. Nice one. I had some problems viewing the screencast in FF 3.0.3 though. IE 7 worked fine.
  4. Erik: right now the intervals are 1000 - if you want, it should be fairly simple to take the code and change it. I suppose it could also be a nice plugin property.
  5. Nice one!
  6. Really nice, but why isn't this build in in Episerver out of the box together with stuff like 'child publish' etc? But a really nice little plugin that works like a charm;)
  7. Hi, this does not work in IE8...
  8. Has anyone made a fix in this plug-in for IE8?
  9. No IE8 fix - and no plans to make one either. This became outdated with EPiServer CMS 6 where drag & drop sorting is out of the box.
Post a comment    
User verification Image for user verification  
Allan Thræn

About me

I am a product manager @ EPiServer, with a passion for the more geeky side of things. My technical interests are typically focused around user problems, user experience,  search, information management, artificial intelligence and  personalization

On top of this blog I have the blog Allan On Technology and I often crosspost.

DISCLAIMER: Unless otherwise stated in the posts, this blog expresses my personal opinions, experiments and views, not necessarilly the views of EPiServer AB.

 303 page views this week.

 

 

Syndications


Archive


Tag cloud

EPiTrace logger