[Zope-Coders] ZPT 'context'

Shane Hathaway shane at zope.com
Mon Oct 6 09:37:57 EDT 2003


Janko Hauser wrote:
> On Sat, 4 Oct 2003 12:46:40 -0400 (EDT)
> Shane Hathaway <shane at zope.com> wrote:
> 
> 
>>Zope 2 ZPT uses the name "here" to refer to the place from which a
>>template was accessed.  Zope 3 ZPT uses the name "context" instead. 
>>To ease migration to Zope 3, I'd like to make the name "context"
>>available in Zope 2.7 ZPT.  It will be synonymous with "here".
>>
> 
> What will happen, if someone calls a pagetemplate with the keyword
> parameter context? Which is not an unlikely idea.

Then they will have to refer to that keyword parameter as 
"options/context", just like they do now.  That's independent of 
"context", so there is no conflict.  In fact, the seemingly 
insignificant choice of whether to make keyword parameters available in 
the root namespace is one of the key differences between ZPT and DTML. 
Blending the two namespaces results in a dead end later on. 
Fortunately, we've learned that lesson. :-)

Shane




More information about the Zope-Coders mailing list