[z3-five] Z2/Z3 skin integration, or, views and portal_skins.
Lennart Regebro
regebro at nuxeo.com
Tue Nov 9 19:24:49 MET 2004
Lennart Regebro wrote:
> I tried to overcome that by making Five use Zope2 PageTemplateFiles
> instead of Zope3 PageTemplateFiles.
Today ZBuddah smiled upon me and handed me a small bit of Zen, and I
came a little bit longer. I was able to make a subclass of Zope2
PageTemplateFile that overrides pt_getContext and manipulates the
context into what it should be instead of what Zope2 gives it.
This is a parallell to what ViewPageTemplateFile does in Zope3.
However, ViewPageTemplateFile does one more thing than manipulates the
context. It also subclasses TrustedAppPT. This makes
ViewPageTemplateFile *trusted code*. Hohoho, very clever, indeed they
are file based, and as such trusted. Problem: Zope2 PageTemplateFiles
are *not* trusted. This means that with my clever hack
tal:content="view/anything" will fail with "You are not allowed to
access 'anything' in this context". I tried
security.declarePublic('anything') but it didn't help!
So close and yet no banana. Any ideas? Is this for some other reason not
a feasible idea anyway? If I solve this, will I just run into more troubles?
//Lennart
More information about the z3-five
mailing list