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 :

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

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

ExplorerTree tree = ATree; tree.PageLink = new PageReference(FacetFactory.Repository.Id); tree.EnableVisibleInMenu = false; tree.PublishedStatus = PagePublishedStatus.Ignore; tree.ShowIcons = false; tree.ShowStatusIcons = false; tree.ShowRootPage = false; tree.ShowToolTip = true; tree.ShowACL = false; tree.ClickScript = "window.parent.navigateEvent(window, '{PageLink}');"; tree.ExpandAll = true; tree.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?

1 Star2 Stars3 Stars4 Stars5 Stars (2 votes, average: 5.00 out of 5)

This entry (Permalink) was posted on Tuesday, May 22nd, 2007 at 4:37 pm and is filed under ASP.NET, EPiServer, Software Development, Web applications. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response , or trackback from your own site.