$tpl = erLhcoreClassDesign::getInstance()->createTemplate('path/to/template.tpl.php'); $tpl->set('username', 'John Doe'); $tpl->set('message', 'Hello World'); echo $tpl->fetch();
$innerTpl = erLhcoreClassDesign::getInstance()->createTemplate('path/to/inner.tpl.php'); $outerTpl = erLhcoreClassDesign::getInstance()->createTemplate('path/to/outer.tpl.php'); $innerTpl->set('username', 'John Doe'); $outerTpl->set('innerTpl', $innerTpl); echo $outerTpl->fetch();This example demonstrates how templates can be nested within each other. An "inner" template is created and assigned data, then placed within an "outer" template using the set function. Finally, the outer template is rendered. Overall, erLhcoreClassDesign is a powerful library for building dynamic templates using PHP and is a part of the Live Helper Chat package.