previousSimple example (Previous) (Next) Defining blocksnext

View this page in Last updated: Sun, 18 Oct 2009
English | Brazilian Portuguese | Chinese | Dutch | French | German | Hungarian | Japanese | Polish | Russian | Spanish | Turkish

Loading files

Template file locations are relative to a definable root directory. You can specify it directly in the constructor (first parameter, defaults to .) or via setRoot().

Files are referenced via handle names. Thus you need to specify the handle name as first parameter, and the file's name as second parameter when calling setFile(). To speed things up, you may pass an array of handle-filename pairs to the method.

Loading a template file

<?php
$t 
=& new HTML_Template_PHPLIB(dirname(__FILE__), 'keep');
$t->setFile('authors''authors.tpl');
?>
previousSimple example (Previous) (Next) Defining blocksnext

Download Documentation Last updated: Sun, 18 Oct 2009
Do you think that something on this page is wrong? Please file a bug report or add a note.
User Notes:
There are no user contributed notes for this page.