November Happy Hour will be moved to Thursday December 5th.

Customizing the page tree using page provider or events?

Vote:
 

Context: EPiServer CMS R2 and above...

Hi.

We have a customer that wants to filter the edit mode page tree to only (with some minor additions) display pages that the editor har permission to change/create.

With a page provider we can do this. We can filter out any pages that the editor only has permission to read. BUT... Since there are no way of detecting whether the pages served are to be used in the page tree or in page rendering, this also affects the final pages served to the user/editor.

The only other way is to hook into the events of the edit mode page tree code, filtering the pages before adding thenm to the page tree.
I have searched for these events but failed to find any. Where can I find documentation on this? What are the names of the events (so that I may search and actually find them)?
Anybody have code examples? Hints/suggestions? ...A solution to the problem?

 

#28976
Apr 01, 2009 9:59
Vote:
 

The best way is to make your own plugin that only show editeble pages in area PlugInArea.EditTree.

Take a look through refelctor on the existing page tree control and just modify it to remove pages that you cant edit.

 

#28977
Apr 01, 2009 11:18
Vote:
 

Or perhaps add editable pages to the favorite tab? I have heard this wish from several customers but with a large tree structure (and often with many levels of children) the usability aspect of filtering is complicated.

#28980
Apr 01, 2009 12:07
Vote:
 

Hook FinishedLoadingChildren event in DataFactory, check if request url is edittree.aspx and limit the Children list there.

I think :-) I've heard this is the way, but never really tested it.

/Steve

#28994
Apr 01, 2009 20:44
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.