1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
|
<tmpl_if expr="defined(unused)">...</tmpl_if>
<tmpl_if expr="(foo + 10) > 20">
Foo is greater than 10.
</tmpl_if>
<tmpl_if expr="bar && foo">
Bar and Foo.
</tmpl_if>
<tmpl_if expr="bar || foo">
Bar or Foo.
</tmpl_if>
<tmpl_if expr="bar || foo || bar || foo">
Multiple ors works
</tmpl_if>
<tmpl_if expr="(bar || foo || bar || foo) && bar">
And 0 works
</tmpl_if>
<tmpl_if expr="(foo + 1) < (foo + 2)">
Addition and comparison 1
</tmpl_if>
<tmpl_if expr="(foo + 1) > (foo + 2)">
Addition and comparison 2
</tmpl_if>
<tmpl_if expr="((foo + 1) > (foo + 2)) || ((foo + 1) < (foo + 2))">
Addition and comparison 3
</tmpl_if>
Bar - Foo = <tmpl_var expr="bar - foo">
Foo - Bar + 10 = <tmpl_var expr="foo - bar + 10">
<tmpl_if expr="((foo * foo) > (foo + foo))">
Math Works, Alright
</tmpl_if>
My name is <tmpl_var expr="ucfirst(fname)"> <tmpl_var expr="ucfirst(lname)">.
Yo, <tmpl_var expr="ucfirst(substr(fname, 1))"> Alien is phat.
<tmpl_var expr="ucfirst(substr(fname, 1))"> has <tmpl_var expr="length(ucfirst(substr(fname, 1)))"> letters, which is <tmpl_if expr="length(ucfirst(substr(fname, 1))) < 10">less than 10<tmpl_else>greater than 10</tmpl_if> and <tmpl_if expr="length(ucfirst(substr(fname, 1))) > 5">greater than 5<tmpl_else>less than 5</tmpl_if>
|