Home
Products
MiniTemplator
DSP collection
ServletViewer
Snippets & Tips
Java
VBasic
VBScript
C#
C / C++
MS SQL Server
TypeScript
source-code.biz
Contact
Donate
About

MiniTemplator

MiniTemplator is a compact, optimized template engine for HTML files.

Features

What is a Template Engine?

[画像:Diagram]

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.

Why use a Template Engine?

The advantage of using a template engine, instead of embedding program code and HTML code, is:

Why use MiniTemplator?

What is special about MiniTemplator, compared to other template engines?

MiniTemplator Template Syntax

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 -->

JavaScript Version

NPM package

minitemplator

Source code repository

GitHub

Java Version

Documentation

API documentation (javadoc)

Example programs

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)

Download

MiniTemplator-java.zip (whole package, including API documentation and sample programs)

Source code repository

GitHub

PHP Version

Documentation

API documentation (phpdoc)

Example programs

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)

Download

MiniTemplator_php.zip (whole package, including API documentation and sample programs)

Visual Basic (VB/VBA) Version

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.

Documentation

API documentation

Example programs

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)

Download

MiniTemplator_vbasic.zip (whole package, including API documentation and sample programs)

AltStyle によって変換されたページ (->オリジナル) /