11 Feb
2000
11 Feb
'00
7:47 p.m.
Just brainstorming here... feel free to slam on this... :) Tres Seaver wrote:
We could perhaps hack the var tag to pass along any non-standard attributes as keyword arguments:
<dtml-var myMethod foo="bar"> # inject foo="bar" into myMethod's namespace
What about: <dtml-var myMethod(foo="bar")> Advantages: + Uses already well-known python syntax. Programmers don't have to learn another. It's meaning is readily apparent. + Makes it visually clear that foo "belongs to" myMethod and not dtml-var. + Removes the need to specially escape dtml-var names. Disadvantages: - Deviates from the current xml-like syntax. But then again, so does the token "myMethod" hanging out in the middle of a tag. - Robb