TemplateParser » History » Version 1
Elmer de Looff, 2012-02-09 15:27
1 | 1 | Elmer de Looff | h1. TemplateParser |
---|---|---|---|
2 | 1 | Elmer de Looff | |
3 | 1 | Elmer de Looff | The µWeb TemplateParser is a in-house developed templating engine that provides tag replacement, tag-functions and template control functions. This document will describe the following: |
4 | 1 | Elmer de Looff | * The [[#Template class]], used to parse the templating language |
5 | 1 | Elmer de Looff | * The [[#Parser clas]], which provides template loading and caching |
6 | 1 | Elmer de Looff | * [[#Using TemplateParser inside µWeb|Using TemplateParser]] inside a µWeb PageMaker |
7 | 1 | Elmer de Looff | * A detailed explanation of the [[#Templating language syntax|templating language]], constructs and behaviors |
8 | 1 | Elmer de Looff | |
9 | 1 | Elmer de Looff | First though, to help with understanding the TemplateParser, a minimal size template document: |
10 | 1 | Elmer de Looff | |
11 | 1 | Elmer de Looff | <pre><code class="html"> |
12 | 1 | Elmer de Looff | Hello [title] [name] |
13 | 1 | Elmer de Looff | </code></pre> |
14 | 1 | Elmer de Looff | The above document contains two simple template tags. These tags are delimited by square brackets, and they will be replaced by the named argument provided during parsing. If this name is not present, then the literal presentation of the tag will remain in the output. |
15 | 1 | Elmer de Looff | |
16 | 1 | Elmer de Looff | h1. Template class |
17 | 1 | Elmer de Looff | |
18 | 1 | Elmer de Looff | h1. Parser class |
19 | 1 | Elmer de Looff | |
20 | 1 | Elmer de Looff | h1. Using TemplateParser inside µWeb |
21 | 1 | Elmer de Looff | |
22 | 1 | Elmer de Looff | h1. Templating language syntax |