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

Filter Path widget items by navigation_settings.displayed_types #194

Open
wolfixsol opened this issue Jan 7, 2020 · 1 comment
Open

Comments

@wolfixsol
Copy link

It would be nice if the path widget would us the "Displayed_types" from plone navigation settings for filtering the tree. It would be quite easy to implement.

In tree.py:

from zope.component import getUtility
from plone.registry.interfaces import IRegistry
from Products.CMFPlone.interfaces import INavigationSchema

..line 82
registry = getUtility(IRegistry)
navigation_settings = registry.forInterface(
INavigationSchema,
prefix="plone",
check=False
)
query['portal_type'] = [t for t in navigation_settings.displayed_types]

I don't know if it would be necessary to make it optional for some reasons.

Cheers,
Ingo

@avoinea
Copy link
Member

avoinea commented Mar 19, 2020

@iwolfm Thank you! A Pull-Request would be appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants