HTML_Template_IT::getGlobalvariables() | HTML_Template_IT::parse() |
HTML_Template_IT | |
PEAR Manual | |
require_once 'HTML/Template/IT.php'; |
boolean
HTML_Template_IT::loadTemplatefile
(
string
$filename
, boolean
$removeUnknownVariables = TRUE
, boolean
$removeEmptyBlocks = TRUE
)
Loads a template from a file and generates internal lists for blocks and variables.
string $filename - file to load
boolean $removeUnknownVariables - if TRUE, not substituted placeholders in a block will be removed
boolean $removeEmptyBlocks - if TRUE, not touched blocks will be removed. Blocks can be touched with HTML_Template_IT::touchBlock().
boolean - Returns TRUE on success, FALSE on failure.
Templatefile main.tpl.htm
<html> <body> User {USERNAME} logged in successfull as {ROLE}. </body> </html> |
Script with $removeUnknownVariables = FALSE
|
Output
User foo logged in successfull as {ROLE}. |
Script with $removeUnknownVariables = TRUE
|
Output
User foo logged in successfull as . |
This function can not be called statically.
HTML_Template_IT::getGlobalvariables() | HTML_Template_IT::parse() |
HTML_Template_IT | |
PEAR Manual | |