The great missing feature of EPiServer

CMS EPiServer Software Development

As we’ve been debating with Steve in the EpiCode IRC channel (Come on, join us there! You know you want it!) a few days ago, probably one of the biggest missing features in EPiServer is multi-page property.

Yes there seems to be a fairly robust implementation of a similar functionality on EpiCode however it’s got 2 serious drawbacks:

  1. adding a great number of consecutive pages is a tedious process
  2. it’s not native to EPiServer, meaning - if I use it in my module that I would like to distribute later I need to put the control there. Short of potential licensing issues, this introduces an unnecessary complication level for such distributable modules

Another big issue with the page selecting dialog - apart form being unable to select multiple pages is its inability to root it anywhere outside the original EPiServer repository root. This really limits its quality in terms of re-using of its functionality to be able to use it for selecting of a limited set of pages.

I really wish I could have a clear API for it like I can use the Windows Forms  Open/Save Dialog in desktop applications. I mean seriously - I thought it was impossible that in a product as well thought out as EPiServer something as basic would be missing - there must be something out there to do it, right? WRONG. I looked all around the EPiServer code assemblies and short of re-coding the dialog form grounds up, all I have been able to dig out was a way to re-use the a part of the favorites functionality of the dialog.

You might find a way to reuse the following piece of code. If you put this in your .ASP :

1<%@ Register TagPrefix="EPiServerSystem" 
2    Namespace="EPiServer.SystemControls" Assembly="EPiServer" %>
3 
4<EPiServerSystem:FavoritesExplorerTree runat="server" ID="ATree">
5    </EPiServerSystem:FavoritesExplorerTree>

Plus a bit of initialization in the Page_Load of the page in the code behind:

 1ExplorerTree tree = ATree;
 2tree.PageLink = new PageReference(FacetFactory.Repository.Id);
 3tree.EnableVisibleInMenu = false;
 4tree.PublishedStatus = PagePublishedStatus.Ignore;
 5tree.ShowIcons = false;
 6tree.ShowStatusIcons = false;
 7tree.ShowRootPage = false;
 8tree.ShowToolTip = true;
 9tree.ShowACL = false;
10tree.ClickScript = "window.parent.navigateEvent(window, '{PageLink}');";
11tree.ExpandAll = true;
12tree.Visible = true;

Then the result is surprisingly pleasant. A tree that allows for selection of (only!) a single node but rooted anywhere you wish.

Favorites Functionality

Neat. But that’s still nowhere near a full dialog, which in the end made us reimplement most of the functionality ourselves.

I had a dream…

Now let me dream for a moment. Let me imagine an API that will allow me to create a dialog which will post-back with multiple pages out of a tree that I can specify a root of, that will also allow me for ordering the result set… all in a nice EPiServer-blueish-well-known-UI…

Dream Dialog

dare I say PLEASEEEE?

Comments