vlibTemplate

vLib Logo

2. Description

It makes use of the following vlibTemplate markup tags (like html tags); <tmpl_var>, <tmpl_loop>, <tmpl_include>, <tmpl_phpinclude>, <tmpl_comment>, <tmpl_if>, <tmpl_elseif>, <tmpl_else>, <tmpl_unless>, <tmpl_endloop>, <tmpl_endcomment>, <tmpl_endif> and <tmpl_endunless>.
The file written with these style tags is called a template. A template can be an HTML file to use on the web, or perhaps a text file to use as an e-mail template... as you can guess there are many many possibilities.

The template file is always seperate from the php script that uses it, that way, a designer for example can change the template file without having to go through all of the php coding, thus saving the developer having to worry about it.
Using this class you set the values for the variables, loops, if statements, etc. which are declared in the template. This enables you to seperate all of the design from the data, which you create using PHP.

vlibTemplate has three user accessible classes. vlibTemplate, vlibTemplateDebug and vlibTemplateCache. vlibTemplate is the main class which handles all of the passing and has the majority of the functions. vlibTemplateDebug and vlibTemplateCache both extend vlibTemplate and inherit it's functionality.
You can therefore change the functionality of vlibTemplate just by appending Debug or Cache.
The debug class requires no parametres to be set, it prints out the vlibTemplate debug module with debug data for the current page. The cache class has a few extra functions that are utilisable, the class saves the parsed file into the filesystem to allow much faster page accesses and a faster site. All are described in the following sections.