[z3-five] Bug in defaultView?
Lennart Regebro
regebro at gmail.com
Sun Oct 8 12:31:22 CEST 2006
On 10/8/06, Richard Waid <richard at iopen.net> wrote:
> This could be a bug, or it could be a misunderstanding of how
> browser:defaultView is supposed to work in Five. I'm also using
> Zope-2.9, so this may be 'fixed' in a later version of Five/Zope too.
>
> Ok, basically I want to have a defaultView of index.html on objects that
> implement an index.html view, otherwise fallback to index_html.
>
> The __browser_default__ method in viewable.py/Viewable suggests that
> this should be the behaviour (it has a fallback that says it falls back
> to index_html),
Thats a documentation bug in that case.
> <browser:defaultView for=".interfaces.IGSContentFolder"
> name="index.html"/>
Yes, that will make the default view index.html, thusly overridding
the Zope2 default of index_html.
--
Lennart Regebro, Nuxeo http://www.nuxeo.com/
CPS Content Management http://www.nuxeo.org/
More information about the z3-five
mailing list