vlibTemplate

vLib Logo

7. vlibTemplateDebug()

This class needs no configuring or any other knowledge. It simply prepends the output of your template file with code to popup the vlibTemplate Debug Module. This module shows a lot of extremely helpful information about the template you parse.


Example

To use vlibTemplateDebug, you just need to alter your class instantiaton to:
$tmpl = vlibTemplateDebug('mytemplates/mytemplatefile.html', $options);


Possibly the most helpful feature of the module is the error checking. It will basically parse through the entire template file that you're parsing, and any included files, and check the <tmpl_*> style syntax for validity. So if you receive vlibTemplate compile errors upon running your code through your browser you can use this module to find out exactly where you went wrong.

Note
This module is HTML based and makes use of javascript functions. Therefore, if you use php from the command line or using a non-javascript browser, you will not be able to use this module.