Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disregarded "show_excluded_items" in navtree #265

Open
ZeEmEs opened this issue Oct 15, 2021 · 0 comments
Open

Disregarded "show_excluded_items" in navtree #265

ZeEmEs opened this issue Oct 15, 2021 · 0 comments

Comments

@ZeEmEs
Copy link

ZeEmEs commented Oct 15, 2021

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
@ZeEmEs ZeEmEs changed the title Desregarded "show_excluded_items" in navtree Disregarded "show_excluded_items" in navtree Oct 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant