Hide items in EditTree

Vote:
 
Is it possible in some way to hide pages in the edit page tree based on permissions? If a user does not have permissions to edit a page I would like it to be hidden for that user. /Mattias
#15839
Mar 25, 2008 19:07
Vote:
 
At this moment there is no support for this feature. It is however a pretty common request and has been on the "feature request" list for sometime. So it is not unlikely that it will be implemented in the future.
#16463
Mar 25, 2008 19:09
Vote:
 
Ok, so there is absolutely no way I can do this? I played with the user control pageexplorer.ascx and hoped there was an event I could tap into. I found PageTreeViewItemDataBound but realized I cannot modify the PageTreeNode collection at that point. No other ideas, ugly or clean, of how this can be solved? /Mattias
#16464
Mar 25, 2008 19:09
Vote:
 
You can try the following code, works for me. :D //Create an event-handle for FinishedLoadingChildren, when the item in the tress are loaded, but not rendered yet. EPiServer.DataFactory.Instance.FinishedLoadingChildren += new ChildrenEventHandler(Instance_FinishedLoadingChildren); if (HttpContext.Current.Request.Url.ToString().StartsWith(EPiServer.Configuration.Settings.Instance.UIUrl.ToString())) { if (e.PageLink == PageReference.RootPage) //applies from RootPage { int pageId = 123; // for (int i = e.Children.Count - 1; i >= 0; i--) { //Try to hide the page id = 123 by removing it from the collection if (e.Children[i].PageLink.ID == pageId) { e.Children.RemoveAt(i); break; } } } }
#16465
Mar 25, 2008 19:09
Vote:
 
Thank you very much! Works like a charm. /Mattias
#16466
Mar 25, 2008 19:09
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* 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.