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;)
Post a comment    
User verification Image for user verification  
Allan Thræn

About me

I'm  a  developer on the Research team, currently stationed in our US office. My technical interests are typically focused around search, information management, artificial intelligence, personalization, tracking user behavior, usability in content management and most of all making cool plugins and code samples for EPiServer.

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

 

 

 


Syndications


Archive


Tag cloud

EPiTrace logger