navtree_properties not picked up by navigation portlet in policy product

Sean Fulmer wsfulmer at gmail.com
Sun Oct 28 19:56:58 UTC 2007


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





More information about the Product-Developers mailing list