[ZPT] v2 of Path Prefixes in CVS

Evan Simpson evan at 4-am.com
Tue Sep 2 12:05:03 EDT 2003


Fergal Daly wrote:
> Penny is dropping, this all comes down to acquisition. I had assumed that 
> acquisition was something that had been implemented at the python class level 
> but, correct me if I'm wrong, acquisition is handled at the TALES level

No, acquisition is a Python-level thing, but TALES does invoke it when 
it tries to traverse a path.  Path prefixes have two motivations: 
explicit traversal control (i.e. 'dc', 'key', 'call', etc) and providing 
for simple data formatting/transformation.

> One complaint still hasn't been addresses. I still think prefixes should be 
> defined in your server setup rather than in your templates. If Zope 2 hasn't 
> got the machinery to do that then I think it would be better to give it the 
> machinery rather than adding define="prefix ..." to TAL.

It doesn't have to be one or the other, since I can certainly envision 
cases where I'd want to pull in a prefix in only one or two templates 
without having to adjust some site-wide object.

Still, if someone can propose a reasonable way to implement site- and 
Product-wide prefix definitions, I'd be very happy to hear about it. 
Such a facility would also be nice for ordinary variables.  Just look at 
the tal:defines in any CMF template :-P.

Cheers,

Evan @ 4-am




More information about the ZPT mailing list