[ZPT] javascript

Florent Guillaume fg@nuxeo.com
Fri, 12 Apr 2002 14:45:41 +0000 (UTC)


Harry Wilkinson  <harryw@nipltd.com> wrote:
> The <script> and <style> tags are specifically excluded from ZPT because they 
> contain data that is supposed to be delivered directly to the application 
> without parsing.  So basically, you can't make your scripts dynamic by 
> embedding ZPT presentation code in them, although I have to say I'd like to 
> be able to.
> 
> If you need your scripts to be dynamic, I suggest using a Python script to 
> generate the Javascript code.

Just rewrite
        <script>
as
        <span tal:replace="structure python:'&lt;script:&gt;'" />
or something like that (completely untested !!).
And same for </script>.

Florent
-- 
Florent Guillaume, Nuxeo (Paris, France)
+33 1 40 33 79 87  http://nuxeo.com  mailto:fg@nuxeo.com