[Zope-CMF] Re: modifying TypeInformation's properties
yuppie
y.2004_ at wcm-solutions.de
Mon Sep 6 12:27:39 EDT 2004
Hi!
Julien Anguenot wrote:
> The problem for us is that we need to monkey patch all the time just to
> add a new property.
>
> Something like that :
>
> from Products.CMFCore.TypesTool import TypeInformation as FTI
>
> if 'cps_is_portlet' not in [prop['id'] for prop in FTI._properties]:
> FTI._properties = FTI._properties + (
> {'id':'cps_is_portlet', 'type': 'boolean', 'mode':'w',
> 'label':'CPS Portlet'},
> )
> FTI.cps_is_portlet = 0
>
> It wouldn't cost anything being able to extend the properties through a
> dedicated API. It doesn't add complexity at all, does it ?
It doesn't add much complexity to the code. That's not what I'm
concerned about. What becomes more complex are the configuration
dependencies between products and the configuration UI.
> We don't wanna create one TypeInformation just for that neither.
Why?
> I don't know much yet about CMFSetup and the possible issue though.
See Tres' reply. He is the project owner. While I'm not happy with his
decision, I'm fine with the fact he made a decision.
Cheers,
Yuppie
More information about the Zope-CMF
mailing list