* @package patTemplate * @subpackage Examples * @link http://www.php-tools.net */ /** * Main examples prepend file, needed *only* for the examples framework! */ include_once 'patExampleGen/prepend.php'; // EXAMPLE START ------------------------------------------------------ /** * patErrorManager class */ require_once $neededFiles['patErrorManager']; /** * patTemplate */ require_once $neededFiles['patTemplate']; $tmpl = &new patTemplate(); $tmpl->setRoot('templates'); $tmpl->applyInputFilter('ShortModifiers'); // If you set 'copyVars' to false, you may only apply one modifier to // a variable, but this way it is faster. // $tmpl->applyInputFilter('ShortModifiers', array('copyVars' => false)); $tmpl->readTemplatesFromInput( 'example_var_modifier_short.tmpl' ); $tmpl->addVar('page', 'now', time()); $tmpl->addVar( 'page', 'sometext', 'This contains some special chars: < > & äÖÜ' ); $tmpl->addVar( 'page', 'multiline', 'This contains some line breaks...' ); $tmpl->displayParsedTemplate(); ?>