[Zope3-Users] Re: how can I call standard publisher if my
PluggableBrowserTraverser don't resolve my request ?
KLEIN Stéphane
stephane at is-webdesign.com
Fri Nov 30 11:34:08 EST 2007
Le Fri, 30 Nov 2007 15:10:37 +0000, KLEIN Stéphane a écrit :
> I've declared browser page for my IMyTest type content
>
> <browser:page
> for="projet1.interfaces.IMyTest"
> name="hello"
> class=".browser.HelloPage"
> permission="zope.Public"
> />
>
> I use PluggableBrowserTraverser like in http://thread.gmane.org/
> gmane.comp.web.zope.zope3.user/4082/focus=4088
>
> In z3c.traverser package documentation, I've this :
>
> """
> Every traverser should also make sure that the passed in name is not a
> view. (This allows us to not specify the @@ in front of a view.) So
> let's register one:
>
> >>> class View(object):
> ... def __init__(self, context, request): ... pass
>
> >>> from zope.component import provideAdapter from
> >>> zope.publisher.interfaces import IPublisherRequest
> >>> provideAdapter(View,
> ... adapts=(IContent, IPublisherRequest), ...
> provides=Interface, ... name='view.html')
> """
>
> I understand this but how can I say : if PluggableBrowserTraverser don't
> found traverser for my request, use "standard" traverser in order to use
> standard browser view declaration ?
I found my mistake, it is standard behavior.
More information about the Zope3-users
mailing list