[ZPT] Idea for variable interpolation
Evan Simpson
evan@digicool.com
Wed, 16 May 2001 00:08:02 -0400
From: <richard@bizarsoftware.com.au>
> <script tal:define="NAME string:'$dir/dot.jpg'" tal:interpolate>
> var img = window.${here/image_name};
> img.src = $NAME;
> </script>
>
> ... so the syntax is the same as the TALES string interpolation. Would
> tal:interpolate need an argument? A better name? :)
That was my first idea, but I worried that ${NAMES} could break the
template. In <style>s for example, that syntax might cause editing programs
to complain about malformed stylesheets. The enforcement of the '${}'
delimiters (or any other reasonable choice I could think of) practically
guarantees that placeholders will make lousy template text.
Cheers,
Evan @ digicool