Forums / Cotonti / Support / ParseBlock Help

Trustmaster
#8674 2009-02-23 04:31
You don't need to include anything, mate! XTemplate is what Seditio/Cotonti uses to render TPL files. So you just use it this way:
$my_tpl = new XTemplate('path/to/file.tpl');
$my_tpl->assign(array(
'TEST_1' => $some_var,
'TEST_2' => $another
));

$my_tpl->parse('MAIN.MY_BLOCK');

$my_tpl->parse('MAIN'); // Parse main block
$output = $my_tpl->text('MAIN'); // return contents
$my_tpl->out(); // output contents
May the Source be with you!