Hi!

Martin Aspeli wrote:
>> Providing customized solutions for specific use cases makes it easier to 
>> solve these use cases, but it also makes the framework more complex and 
>> less framework-ish.
> 
> Then why do we have <browser:page />?

I guess primarily for historical reasons. And because zope.app is in 
some parts an application, not a framework. And because the 'template' 
attribute is sometimes a convenient shortcut.

> You could of course do:
> 
> <adapter
>    for=".interfaces.IMyType
>         Products.CMFDefault.interfaces.ICMFDefaultLayer"
>    provides="zope.interface.Interface"
>    name="myview"
>    factory=".myview.MyView"
>    />
> <class class=".myview.MyView">
>    <require
>        permission="zope2.View"
>  
> allowed_interface="zope.publisher.interfaces.browser.IBrowserPage"
>    />
> </class>

The <class/> hack is not necessary in Zope 3. This is much closer to 
<browser:page/> and easier to read:

<adapter
    for=".interfaces.IMyType
         Products.CMFDefault.interfaces.ICMFDefaultLayer"
    provides="zope.publisher.interfaces.browser.IBrowserPage"
    name="myview"
    factory=".myview.MyView"
    permission="zope2.View"
    />


Cheers,

        Yuppie

_______________________________________________
Zope-CMF maillist  -  [email protected]
http://mail.zope.org/mailman/listinfo/zope-cmf

See https://bugs.launchpad.net/zope-cmf/ for bug reports and feature requests

Reply via email to