File: test_loop3.tmpl

package info (click to toggle)
libhtml-template-pro-perl 0.9524-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 1,512 kB
  • sloc: ansic: 1,841; perl: 1,474; yacc: 404; pascal: 118; makefile: 6
file content (40 lines) | stat: -rw-r--r-- 931 bytes parent folder | download | duplicates (6)
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
<HTML>
<body>
<H1> test_loop3 </H1>

We test loops and nesting

<table>
<TMPL_LOOP name="HASHREF1"> <tr>
  <td><tmpl_var NAME="LOOPVAR1"></td>
  <td><tmpl_var NAME="LOOPVAR2"></td>
  <td><tmpl_var NAME="LOOPVAR3"></td>
  <td><tmpl_var NAME="LOOPVAR0"></td>
 </tr> <TMPL_LOOP NAME=HASHREF0>
test failed <tmpl_var NAME="VAR1"> test failed
</tmpl_loop> <TMPL_LOOP NAME=FAKEHASH> 
test failed <tmpl_var NAME="VAR1"> test failed
</tmpl_loop> </tmpl_loop> 
</table>

<TMPL_LOOP NAME='HASHREF0'> 
test failed <tmpl_var NAME="VAR1"> test failed
<table>
<TMPL_LOOP NAME=HASHREF1><tr>
<td><tmpl_var NAME="LOOPVAR1"></td>
<td><tmpl_var NAME="LOOPVAR2"></td>
<td><tmpl_var NAME="LOOPVAR3"></td>
<td><tmpl_var NAME="LOOPVAR0"></td>
</tr>
</tmpl_loop> 
</table>
</tmpl_loop>

<tmpl_if VAR2> <tmpl_var name="VAR2"> test passed </tmpl_if>

<TMPL_LOOP name="FAKENAME"> 
test failed <tmpl_var NAME="VAR1"> test failed
</tmpl_loop> 

</body>
</HTML>