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