File: loop.tmpl

package info (click to toggle)
libhtml-template-expr-perl 0.07-3.1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 248 kB
  • sloc: perl: 285; makefile: 2
file content (14 lines) | stat: -rw-r--r-- 650 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<tmpl_loop simple>Foo is <tmpl_if expr="(foo > 10)">greater than<tmpl_else>less than</tmpl_if> 10.
</tmpl_loop>

<tmpl_loop complex>
   <tmpl_if expr="color eq 'blue'"><blue></tmpl_if>
   Name: <tmpl_var expr="ucfirst(fname)"> <tmpl_var expr="ucfirst(lname)">
   Stats:
   <tmpl_if expr="color eq 'blue'"><blue></tmpl_if>
   <tmpl_loop inner><tmpl_var stat_name> <tmpl_if expr="stat_value > 10">[high]<tmpl_else><tmpl_if expr="stat_value < 1">[low]<tmpl_else>[medium]</tmpl_if></tmpl_if>
   Color: <tmpl_var color>
   </tmpl_loop>
   <tmpl_if expr="color eq 'blue'"></blue></tmpl_if>
   <tmpl_if expr="color eq 'blue'"></blue></tmpl_if>
</tmpl_loop>