[Product-Developers] know folderish types

Alejandro Pereira alepereira86 at gmail.com
Mon May 28 18:19:44 UTC 2012


Gilles Lenfant wrote me this:

*Hi,

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.*
*listPortalTypesWithInterfaces(**[IFolderish])

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.

HTH* *
*

This is good to know. In my opinion it would be great if dexterity can
provide something like this.

Best.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.plone.org/pipermail/plone-product-developers/attachments/20120528/805c656c/attachment.html>


More information about the Product-Developers mailing list