[z3-five] "view" variable on a view
Martin Aspeli
optilude at gmx.net
Tue Dec 12 20:09:47 CET 2006
Sébastien VINOT wrote:
> Hello,
>
> I'm using Five (version 1.3.6) with Plone 2.5 and Zope 2.9.4 under a
> Debian release.
>
> I have a View (defined on my configuration.zcml file) which works
> perfectly. I've seen on Zope3 "Web Component Dev with Zope 3" that a
> variable called "view" can be used (aspecially if both a template and a
> class are specified on the "browser:page") inside Views.
>
> When I try to a a simple "<span tal:replace="view" />" mon my view, I
> get an exception error : Not authorized to access binding: context
>
> I also tried to call method of my view class.
>
> My question is : can we use the "view" variable inside a Five view ?
Yes. Take a look at
http://plone.org/documentation/tutorial/borg/zope-3-views
Your security problems are most likely caused by a lack of acquisition
in the view. Inheriting from Products.Five.browser.BrowserView tends to
work the best.
Martin
More information about the z3-five
mailing list