MiniTemplator is a compact, optimized template engine for HTML files.
A template engine is a software module which is used to generate HTML pages (or other text files). The layout of a HTML page is defined within a template file, which can be designed by using a standard HTML editor like FrontPage. At run-time, the application program instructs the template engine to load the template, fill in variable values, repeat blocks and produce the final HTML page.
The advantage of using a template engine, instead of embedding program code and HTML code, is:
What is special about MiniTemplator, compared to other template engines?
A simple syntax is used to define variables and blocks within the template. This syntax is compatible with HTML editors like FrontPage, but it can also be used for non-HTML files.
Variables:
${VariableName}
Blocks:
<!-- $beginBlock BlockName -->
... block content ...
<!-- $endBlock BlockName -->
Include a subtemplate:
<!-- $include RelativeFileName -->
Conditional statements (only implemented in the JavaScript and Java versions):
<!-- $if condExpr -->
...
<!-- $elseIf condExpr -->
...
<!-- $else -->
...
<!-- $endIf -->
API documentation (javadoc)
Example1: | Program | Template (HTML code) |
Output Page (web page) |
Output File (HTML code) |
Example2: | Program | Template (HTML code) |
Output Page (web page) |
Output File (HTML code) |
MiniTemplator-java.zip (whole package, including API documentation and sample programs)
API documentation (phpdoc)
Example1: | Program | Template (HTML code) |
Output Page (web page) |
Output File (HTML code) |
Example2: | Program | Template (HTML code) |
Output Page (web page) |
Output File (HTML code) |
MiniTemplator_php.zip (whole package, including API documentation and sample programs)
The VB-Version of the MiniTemplator is in VB6 format, but the VB-Module can also be used within a Microsoft-Access application, i.e. to produce static HTML pages from database content.
Example1: | Program | Template (HTML code) |
Output Page (web page) |
Output File (HTML code) |
Example2: | Program | Template (HTML code) |
Output Page (web page) |
Output File (HTML code) |
MiniTemplator_vbasic.zip (whole package, including API documentation and sample programs)