[Product-Developers] know folderish types
alepereira86 at gmail.com
Mon May 28 18:19:44 UTC 2012
Gilles Lenfant wrote me this:
The Archetypes tool provides what you need if I understand correctly.
from dontremember.interfaces import IFolderish
from Products.CMFCore.utils import getToolByName
at_tool = getToolByName(context, 'archetype_tool')* *
folderishes = at_tool.*
IIRC the returned value (folderishes) is a list of fti objects from which
you can get the portal type. This should work - untested - on non AT based
types too (plone.app.content or dexterity) since this uses the portal_types
factory and no AT specific stuff.
This is good to know. In my opinion it would be great if dexterity can
provide something like this.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Product-Developers