[ZPT] Are PageTemplateFiles restricted code?

Michael R. Bernstein mbernstein@codeit.com
28 Feb 2002 14:27:45 -0800


On Thu, 2002-02-28 at 09:33, Evan Simpson wrote:
> Michael R. Bernstein wrote:
> > It seems that a PageTemplateFile in a class cannot access simple class
> > attributes when the class has it's default access policy set to 'deny'.
> 
> Yes, PageTemplateFiles are fully restricted.  This is based partly on 
> the idea that presentation code shouldn't need special access, and 
> partly to facilitate 'skinning' (move the code into a ZopePageTemplate, 
> and it should still work).  It is inconsistent with DTMLFile.

BTW, at what point (and in what forum) was this design decision made?

I can see the advantages of this decision the more I think about it, but
the inconsistency with DTMLFile still bothers me, as it erects another
barrier to migration of developers from DTML to TAL (at least for
products). In return, we get greater convenience for skinning, but I'm
not sure the tradeoff was worth it.

Michael.
-- 
---------------------------------------------------
| Michael Bernstein   http://michaelbernstein.com |
|                                                 |
| CodeIt Computing    http://codeit.com           |
---------------------------------------------------