view res/kryshen/tema/demo/demo.template @ 2:6c41a0b43e58 release_0_3

Tema 0.3 (imported from CVS).
author Mikhail Kryshen <mikhail@kryshen.net>
date Tue, 19 Feb 2008 20:32:17 +0300
parents 548a93c24e55
children
line wrap: on
line source

[%!\
  Tema demo template 
%]\\

<%tema:%>

Escaping special character sequences:
[%\<%test:%>%]

Macro definition:
<%define#test
  arg1:<%next_arg:%>, arg2:<%next_arg:%>, data:<%data:%>.%>

Invoke defined macro:
<%test:1 2 3 4 5%>

Define macro implemented as a Java class:
<%load\hello kryshen.tema.demo.Hello%>

Invoke defined macro:
<%hello\Tema%>

Conditional output:
<%optional:<%true:%>True%>\
<%optional:<%false:%>False%>

Cycle:
<%silent define#cycle_test
  Arguments list: <%while#"<%next_arg:%>" %>\
%>\
<%cycle_test:1 2 3 <%:4 5%>%>

Escaping special characters in XML:
<%xml_escape\x < a & b%>