[Zope3-Users] how can I call standard publisher if my PluggableBrowserTraverser don't resolve my request ?

KLEIN Stéphane stephane at harobed.org
Fri Nov 30 10:10:37 EST 2007


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 ?

Thanks for your help,
Stephane



More information about the Zope3-users mailing list