[ZPT] Re: RFC: TALES adapters and TAL/Tales variable namespaces

Philipp von Weitershausen philipp at weitershausen.de
Fri May 28 02:48:04 EDT 2004


Garrett Smith wrote:
> This problem seems analogous to view lookup -- 
> "content/++view++index.html" and "content/@@index.html" are equivalent.
> 
> So, applied to adapters, we could use:
> 
>   content/++adapter++dc/title (or '++adapt++')

+1 on ++adapt++.

I think using the the traversal machinery and its syntax would be a very 
elegant solution. Then using either ##, ** or :: as a shortcut (in 
analogy to @@) would be even more consistent, since in current 
component-architecture-speak, views are multi-adapters.

Just compare them visually:

   - context/@@absolute_url

   - context/date/**format

or

   - context/@@standard_macros/page

   - context/**dc/title

> one could use:
> 
>   content/##dc/title

Using # in path expressions always reminds me of anchors in HTML, e.g. 
http://foo/bar#section2

> or perhaps (yuckier):
> 
>   content/**dc/title

+1

> I'd hate to see Yet Another Traversal Syntax introduced when we already 
> have a decent pattern established.

Indeed. Especially introducing non-slash characters as separaters in 
path expressions, such as parentheses, would mean getting rid of their 
beauty through simplicity. I feel very strongly about keeping path 
expressions simple and not cryptic.

Philipp




More information about the ZPT mailing list