Javascript templates

Does anyone know if is there any way to create javascrit templates in Genshi? I mean, I need a .js file where I can use directives like <py:for> and so.

Any idea? Thanks!

Answers


You can write it directly in html like this:

<script type="text/javascript">
<py:if test="func1">
/*&lt;![CDATA[*/
      function func1() {
      }
/*]]&gt;*/
</py:if>
</script>

note: code inside CDATA will be right escaped, so you can use '>','<' as usual.


Need Your Help

Sending long commands with Expect and ssh

ssh expect

I have an Expect script in my Tcl 8.5 framework.

CorePlot : 2 Y axes using different plot spaces - formatting issue

ios core-plot

I have two y-axes with different scales. So I added another plot space. I used the same xRange for the second plot space, but use a different yRange, e.g.,