SaaS CMS has officially launched! Learn more now.

Hide pages from page tree in edit



I want to alter the default page tree in edit mode based on some different criteria. Hide some structures for specific editors, only display certain content types etc etc.

I got as far as using a custom ContentQuery inheriting from ContentQueryBase. Then add the ServiceConfiguration attribute with IContentQuery as type.

The thing I don't understand is how I get this CustomContentQuery to be used when the default page tree is loaded?

Does anyone know how to achive this or maybe a better way to do this?

Feb 02, 2015 11:57

Hi Eric, 

This blog post may help you in hidding the pages in edit tree

Feb 02, 2015 12:54

Hi Shahid

Unfortunatly that only works in episerver 7, and I need it for cms 7.5 :(

Edited, Feb 02, 2015 12:56


Has no one had this requirement from a customer before? A "personalized/adjusted" page tree based on roles/accessrights?

Feb 04, 2015 8:07

I commented on Thomas blog post. If you use EPiServer 7.5, you need to add a Rank property to the query.

public override int Rank { get { return 100; } } //The default queries have 0 as rank

Feb 04, 2015 9:57

That is great! Thanks a lot Linus, seems to work as intended now :)

Feb 04, 2015 10:42

Hi Again!

I have another issue. The above method seems to affect the page tree everywhere in the edit mode where you can select pages (link dialog, link list et).

Is there someway to specify so that it's only the editor page tree component/view that is affected? I mean the component where editors navigate the structure of the site.

Feb 04, 2015 11:54

Hi Eric!

The answer is no, there is no simple way of just manipulating only what the navigation tree shows (at least not that I'm aware of). The code sample that Thomas has done basically changes the entire server side data store for content, so you should be aware that it's affecting all nagivation of content, not only pages.

Feb 04, 2015 13:59

Hi Linus!

Ah, I understand. It's fairly easy to just manipulate pages since I have access to start nodes, but if I can't control it for a specific view it won't help.

Do you have any other suggestions or examples of limiting what a specific editor can se in the navigation tree? What the customer want's is basically the "Favorites" feature that existed in CMS6R2 where and editor could bookmark certain nodes in the pagetree. That way they don't have to navigate a sometimes huge structure to create content.

My idea was to filter the navigation tree based on access rights so that an editor can only see and create content where they are allowed too. Maybe it's possible to build a custom plugin for this?

Feb 04, 2015 14:58

Hi again Eric!

The UI is pretty much prepared for this though there is currently no extensionpoint to define the root nodes for the page navigation tree. I did a test and it's åpretty easy to acomplish this so I'm investigating if it would be possible to add support for this, even though this might be in the form of an API or by setting a predefined profile setting.


Feb 09, 2015 14:13

Thanks Linus, that sounds great. We quite often get the question from our customers and it would be a really nice feature :)

Putting a pin in this, and looking forward to hearing more about it in the future :)

Feb 09, 2015 14:21
Feb 10, 2015 10:10

Has there been any progress on being able to bookmark pagetree nodes? Has there been any progress in being able to traverse folders in the internal Page or Media Link Dialog to link to content that authors can't read? 
In Ektron, there was a difference between "Traverse" rights and "Read" rights. Out content authors don't need to see every folder when editing pages but still should be able to access all files and pages when inserting an internal link.

Sep 13, 2016 20:16
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* 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.