> I want to have a variable to be substituted on a template, inside a
> comment. I have a code like this:
>
> <html>
> <head>
> <script><!--
> var somevar = ${someVariableFromPython};
> --></script>
> </head>
>
> This is not working because kid doesn't do interpolation on comments,
> but without comments, kid doesn't compiles the template and throughs
> me an error.
> What can I do to solve this problem?
Actually, putting the script in comments should not be necessary any
more. Since MSIE 3.0 and Netscape 2.0, all browsers know the script tag.
If you really want to include it when rendering HTML, you could do the
following trick:
<head>
<script>$START_COMMENT
var somevar = ${someVariableFromPython};
$END_COMMENT</script>
</head>
with
START_COMMENT, END_COMMENT = '<!--', '//-->'
-- Christoph
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
kid-template-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/kid-template-discuss