See also issue 190 and 192.
The behavior of "show_excluded_items" as I understand it, is not given in the navigation tree in plone 5 as compared to plone 4.
The reason is, in /plone/app/layout/navigation/navtree.py at line 317 the variable "strategy.showAllParents" doesn't get changed with the condition of "show_excluded_items" as it was before.
I couldn't really make out how "strategy.showAllParents" is set.
But I get the desired behavior by adding the condition of "show_excluded_items" to the condition in line 317 like so
if strategy.showAllParents and objPath is not None and getUtility(IRegistry)["plone.show_excluded_items"]:
For this to work in navtree.py one has to import additionally
from plone.registry.interfaces import IRegistry
from zope.component import getUtility
See also issue 190 and 192.
The behavior of "show_excluded_items" as I understand it, is not given in the navigation tree in plone 5 as compared to plone 4.
The reason is, in /plone/app/layout/navigation/navtree.py at line 317 the variable "strategy.showAllParents" doesn't get changed with the condition of "show_excluded_items" as it was before.
I couldn't really make out how "strategy.showAllParents" is set.
But I get the desired behavior by adding the condition of "show_excluded_items" to the condition in line 317 like so
if strategy.showAllParents and objPath is not None and getUtility(IRegistry)["plone.show_excluded_items"]:For this to work in navtree.py one has to import additionally