Martin Aspeli wrote:
from plone.portlets.constants import CONTEXT_CATEGORY
from plone.app.portlets.utils import assignment_from_key

# 'context' here is the GS context passed to the setup handler
site = context.getSite()

navtree = assignment_from_key(site, 'plone.leftcolumn', CONTEXT_CATEGORY, '/', 'navigation')
navtree.currentFolderOnly = True

Thanks, Martin - that's exactly what I needed! But you already knew that :)

I made one small change...

navtree.currentFolderOnly = \
     portal_properties.navtree_properties.currentFolderOnlyInNavtree

This way, I can still manage the nav portlet configuration in the profile. Is that a sound strategy?

--
Sean


_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers

Reply via email to