[ZPT] Re: TAL and METAL in <script> and <style>

Martijn Pieters mj@zope.com
Mon, 14 Oct 2002 09:49:31 -0400


On Mon, Oct 14, 2002 at 12:14:03PM +0100, Chris Withers wrote:
> Well, taking this use case, the current behaviour is confusing.
> 
> I'm a designer, I get this template I know I'm allowed to tweak but I have 
> no idea what this tal: stuff is. I do however, know a bit of javascript.
> So, I happily tweak the <script> stuff ignoring the funny tal: bit until it 
> does what I want. I hand over the template to the scripter who does his 
> thing and hands off to the customer. I'm then confused as to why the 
> customer is unhappy until I find out that none of my javascript is working. 
> I wonder what to do next.
> 
> So, if this use case is broken anyway, could we at least make it useful to 
> the coders and scripters of this world and allow tal: inside <script> and 
> <style> tags? ;-)

I don't think it is broken; as a coder you always have to weary of changes
to a template that break the templating code. Imagine a table row with a
tal:repeat copied over to a new table for convenience of the designer. Any
template editied by a non-coder needs inspection as an unrendered template
anyway, as well as discussion with the designer as to what he/she expects
will happen when it is templated.

Page templates support the use case, but as any tool will not make it work
by magic.

-- 
Martijn Pieters
| Software Engineer  mailto:mj@zope.com
| Zope Corporation   http://www.zope.com/
| Creators of Zope   http://www.zope.org/
---------------------------------------------