[z3-five] RFC: new five:registerClass directive

Martijn Faassen faassen at infrae.com
Tue Oct 25 17:01:50 CEST 2005


Hey yuppie,

yuppie wrote:
[snip]
> TODO.txt has already this entry:
> 
>   Allow Zope2 boilerplate context.registerClass be configured
>   through zcml
> 
> And that is indeed all we need. Here is an example for the directive I 
> propose:
> 
>   <five:registerClass
>       class=".content.Foo"
>       meta_type="Foo Form"
>       addform="addfoo.html"
>       permission="Add Foo"
>       icon="foo_icon.png"
>       />
> 
> This sets the attributes meta_type ('Foo Form') and icon 
> (++resource++foo_icon.png) on the class and registers 'Foo Form' in 
> Products.meta_types, making '+/addfoo.html' the add action.
> 
> Using the browser:icon directive to set the icon doesn't work because it 
> sets the icon for an interface, not for a class. But Zope 2 requires an 
> icon attribute on the class (or the object).
> 
> I have already a working prototype and if there are no objections I'd 
> like to add this feature to the Five trunk tomorrow before Five 1.2 is 
> branched.

This sounds really cool! You have a +1 from me for this feature.

Regards,

Martijn


More information about the z3-five mailing list