Hide pages from page tree in edit

Vote:
 

Hi!

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?

#116570
Feb 02, 2015 11:57
Vote:
 

Hi Eric, 

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

http://tedgustaf.com/blog/2013/4/hide-pages-in-the-page-tree-in-episerver-7/

#116571
Feb 02, 2015 12:54
Vote:
 

Hi Shahid

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

#116572
Edited, Feb 02, 2015 12:56
Vote:
 

Bump.

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

#116680
Feb 04, 2015 8:07
Vote:
 

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



#116701
Feb 04, 2015 9:57
Vote:
 

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

#116707
Feb 04, 2015 10:42
Vote:
 

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.

#116724
Feb 04, 2015 11:54
Vote:
 

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.

#116753
Feb 04, 2015 13:59
Vote:
 

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?

#116763
Feb 04, 2015 14:58
Vote:
 

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.

/Linus

#116982
Feb 09, 2015 14:13
Vote:
 

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 :)

#116985
Feb 09, 2015 14:21
Vote:
 
#117025
Feb 10, 2015 10:10
Vote:
 

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.

#155310
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.