Shane Hathaway wrote:
Philipp von Weitershausen wrote:
Shane Hathaway wrote:
Philipp von Weitershausen wrote:
   Like zope:view, except:

     * the request type (second adapted object) defaults to

     * the "permission" always applies to 'publishTraverse',
       'browserDefault' and '__call__' attributes, in addition to the
       optionally specified "allowed_attributes" or "allowed_interface"
So, is a browser:view publishable, like a browser:page?

No. That's why you can't open URLs like http://.../anobj/@@absolute_url (like you can in Zope 2) because absolute_url is a view, but one that's not publishable.

Well, actually there's a browser:page directive on the Zope 3 trunk that makes @@absolute_url publishable.


However, I'm wondering what browser:page does to make something publishable, that browser:view doesn't do.

It creates a new class with an extra mix-in class that has a browserDefault method which in turn points to the template, method or __call__ attribute.

In one of my attempts to sanitize all this stuff, I envisioned making a base class like that (the saner version is BrowserPage) mandatory, so that people know where the magic is... In fact, if you use BrowserPage today, you can actually register it as a publishable view using a standard <adapter /> directive.

-- -- Professional Zope documentation and training
Zope3-dev mailing list

Reply via email to