small fixes from nye
[yatt.git] / php / example.yatt
1 %[#]
2 %[#] This is a template comment
3 %[#] This is stripped out by the template parser
4 %[#]
5
6 %[#] This is an include statement, it loads the file as if it were
7 %[#] a part of this one. This should generate an error since missing.yatt
8 %[#] isn't actually included with the example.
9 %include [missing.yatt]
10
11 %[#] This begins a block of text, blocks can be inside of other blocks.
12 %begin [faz]
13
14 Here is some static text to be printed when 'faz' is parsed.
15
16 This is a variable: %[CRACK]
17
18 %[#] Another random block of text: parsed with 'faz.test'
19 %begin [test]
20
21 recursive variable substitution in action:
22 this is recursive: %[CORK_%[FNORK]] wheee!
23
24 %end [test]
25
26
27 some other stuff: %[FOO]
28 some other stuff: %[BAR]
29
30 undefined variables are bad: this should generate an error: %[UNDEFINED]
31
32 %[#] How about another example?
33 %begin [table]
34
35 foo table header
36 --------------
37 %begin [row]
38 FF: %[ROW_NAME]
39 %end [row]
40 --------------
41 foo table footer
42
43 %end [table]
44
45
46 and some stuff down here!
47
48 %end [faz]
49