Excluding instances of "WebPreferences" in DocumentTrees

Hey, all,

I have been trying, with mixed results, to hide instances of “Page Administration” (the “WebPreferences” page) from page lists. I realize that, as admin, I have irrevocable “view” rights on every page, so modifying rights is not going to work for this purpose. (It worked wonders for my XWikiAllGroup test user, although I must have broken something in the process because even after adding it to a “moderator” group with most rights globally, the test user can’t edit any pages. Whoops!)

I successfully managed to hide all instances of “Page Administration” from the Navigation panel by modifying the object code to add documents whose references end in “WebPreferences” to the exclusions set. But because the Document Tree Macro does not operate similarly, I have had no such luck hiding WebPreferences pages from Children trees, Sibling trees, etc. I use the former on some top-level pages to make it easy for users to find articles that fall under certain categories, and while not breaking behavior, the inclusion of WebPreferences in these trees adds unnecessary noise to them (and to the page index, actually) and makes keeping track of things a little more difficult for me.

Thanks in advance for your advice!

The “WebPreferences” pages are normally hidden so you shouldn’t see them in the document tree unless you configured your user profile to see hidden pages. As an admin I understand why you may want to do that, but I don’t see why your other (simple) users would want to see hidden (i.e. technical) pages.

Yeah, I appreciate that. This is more for my benefit, and the benefit of future admins. Not a big deal; just a QoL thing I’d like to implement if at all possible.