Addons

HOWTO: Disable by Coverage and by Subjects Virtual Navigations

Updated: December 4, 2024

You can contribute new virtual navigations in Nuxeo with Studio. It is possible to disable or hide the existing By Coverage and By Subjects one.

Disabling Default Virtual Navigations

If you'd like to disable the By coverage and By Subject virtual navigations, you can do so with the following contribution:

<extension target="org.nuxeo.ecm.webapp.directory.DirectoryTreeService"
  point="trees">
  <directoryTree name="bySubjectsNavigation" enabled="false" />
  <directoryTree name="byCoverageNavigation" enabled="false" />
</extension>

When disabling them outside of a Studio contribution, the following requirement is also needed to ensure that this contribution is loaded after the default ones:

<require>
  org.nuxeo.ecm.virtualnavigation.directory.DirectoryTreeService.contrib
</require>

If you're using the faceted search, disabling these configurations will produce misbehaviours in widgets presenting these trees, and will produce the following error logs:

ERROR [org.nuxeo.ecm.webapp.directory.DirectoryTreeManagerBean] no DirectoryTreeDescriptor registered as byCoverageNavigation
ERROR [org.nuxeo.ecm.webapp.directory.DirectoryTreeManagerBean] no DirectoryTreeDescriptor registered as bySubjectsNavigation

In this case, you just need to hide these virtual navigations instead of disabling them.

Hiding Default Virtual Navigations

To hide the By Coverage and By Subjects virtual navigations, you just need to declare an XML extension from the Advanced Settings menu entry.

<extension target="org.nuxeo.ecm.webapp.directory.DirectoryTreeService"
  point="trees">
  <directoryTree name="bySubjectsNavigation" isNavigationTree="false" />
  <directoryTree name="byCoverageNavigation" isNavigationTree="false" />
</extension>

When hiding them outside of a Studio contribution, the following requirement is also needed to ensure that this contribution is loaded after the default ones:

<require>
  org.nuxeo.ecm.virtualnavigation.directory.DirectoryTreeService.contrib
</require>