samuelet / indexmenu

A dokuwiki plugin to show a customizable and sortable index for a namespace.
http://dokuwiki.org/plugin:indexmenu
GNU General Public License v2.0
44 stars 43 forks source link

Hide namespaces containing no visible pages? #235

Closed GJRobert closed 8 months ago

GJRobert commented 4 years ago

Hello,

as for now, hidden pages which are not visible to the current user, are also hidden in the Indexmenu of course. However, the containing namespace, even if all of its child pages are hidden, is still displayed and holding the place. Clicking on the "empty" namespace to try to open it would make Indexmenu to read the list of the pages and then return a null result, resulting in an empty namespace.

So how about hiding that "empty" namespace in the first place in the Indexmenu, so that the user will not even waste time on opening them?

(My situation is, the ACL is not blocking the namespace to the user, but the child pages are hidden due to there "draft" status (via plugin:publish), so it is indeed easily possible that all pages are hidden, but the namespace, since it's not hidden by ACL or skipped in Indexmenu settings, is still shown, finally rendering a useless and empty namespace.)

Klap-in commented 3 years ago

I understand your UX issue. However, it is probably some puzzling to find an complete solution for this, because a lot of items are retrieved recursive (i.e. iterative per namespace) depending on the settings.