On Fri, Sep 28, 2007 at 05:33:56PM +0800, Yuan HOng wrote:
> On 9/28/07, Frank Burkhardt <[EMAIL PROTECTED]> wrote:
> > You just need another browser:page here. Name it 'in-shelf-view' and
> > use something like
> > <div tal:replace="structure book/@@in-shelf-view" />
> > to embed it.
> Thanks, that works. So all was missing is the '@@' notation to tell
> TALES to look up a view for Book.
> > Registering the view for different "shelves" is possible, too. But this not
> > a simple view anymore - it's a "Multiview". You need an adapter for
> > (book,shelve,request) to do that which means, a simple browser:page won't
> > work and you'll be not able to use the object/@@view notation for that.
> If not object/@@view, what then? A custom traverse to lookup the
> Multiview maybe?
You could use a view as dispatcher which then would be traversed like
return "Book/shelf-specific html"
<browser:page for=".interfaces.IMyBook" name="view" class="MyDispatcher" ...
<zope:adapter for=".interfaces.IMyBook .interfaces.IMyShelf IBrowserRequest"
Zope3-users mailing list