Proposed solution: check paths with trailing slash:
- if brain.exclude_from_nav and not context_path.startswith(brain_path):
+ if not context_path.endswith("/"):
+ context_path += "/"
+ brain_path_full = brain_path
+ if not brain_path_full.endswith("/"):
+ brain_path_full += "/"
+ if brain.exclude_from_nav and not context_path.startswith(brain_path_full):
If show excluded items is activated in navigation settings, a hidden content item will show up if the path partially matches the current item.
Example:
path_2
is hidden from navigation, but shows up as soon aspath_1
is the current content.This is because in https://github.com/plone/plone.app.layout/blob/master/plone/app/layout/viewlets/common.py#L334 the compared paths don't have a trailing slash.
Proposed solution: check paths with trailing slash:
Any thoughts on that?