Making some menu items not clickable in navigation panel

Good morning!
I have an ongoing challenge with the navigation panel. I have structured my wiki in a traditional tree with documents that essentially act as containers for those below so as follows:

Top level - Clinical guidelines
Children of the Clinical guidelines document

  • Infectious disease
  • Orthopaedics
  • Respiratory disease

Top level - Operational guidelines
Children of the Operational guidelines document

  • Logistics
  • Aviation

My issue is that when displayed in a navigation menu the Clinical Guidelines and Operational Guidelines pages are clickable in the menu and take the user to what is, essentially a blank page. Because Im using documents at that level as containers for the children (which contain the information) they can also be opened by clicking the link - but don’t provide any information of use.
What I really want is for those ‘container’ documents, that are just being used to provide a classification hierarchy are not clickable.
Is there any way of achieving this?
Do let me know if anything isn’t clear!
Thanks!

Hi, in XWiki there are only pages (no container or folder like on your file system). A page can contain other pages, and so on. So they all contain content. You just need to put content in them. For example, in your structure you need to put content in the “Clinical guidelines” page.

BTW “Infectious disease” has content but yet it’s also a container page since you can put content below :wink:

I don’t think there’s any config for the document tree macro to avoid clicking on container pages since all pages are container pages, which would mean you wouldn’t be able to click on any.

Now I guess there could a test to verify if the page exists and not and if not, have a setting to not allow to click it.

Thanks!
Yes, I understand. What I was trying to avoid was having unnecessary pages that didn’t really provide much information and required to be clicked through. What you suggest is entirely viable though - as you say the wiki has an essentially flat, but referenced hierarchy.
I guess the other solution would be to build a menu from scratch. If I wanted to build a responsive menu that expanded on click, would there be an extension that you could recommend. I understand that such a solution would likely be static, but Id like it to be possible to collapse each branch.
Thanks for your help.

Yes you could use the Tree Macro to have a static tree in a panel: https://extensions.xwiki.org/xwiki/bin/view/Extension/Tree%20Macro

Our users find it useful to have those “container” pages with a documentTree macro to have all children pages listed.

{{documentTree root="document:" filterHiddenDocuments="true" showOnlyViewable="true" showAttachments="false" compact="true" limit="1000"/}}

Maybe your users find it useful too?
Regards, Simpel