Using A Template Engine - ZingPHP/Zing GitHub Wiki
If your project uses a template engine, it is recommended that you set it in your config file (but it isn't required). If you do set an engine in your config file, it would look something like this:
$config = array(
"websites" => array(
array(
// This is the directory name found under "src/Modules/TemplateEngines".
// Zing Comes with 2 engines: "Smarty" and "Twig".
"tplEngine" => "Twig",
),
)
);
If you don't set it in your config, then you will need to call it from within your page using getEngine()
which would then look something like this:
public function main(){
$this->tpl->getEngine("Smarty");
$this->tpl->assign("value", "My Value");
}
If you don't want to use either Smarty or Twig, then you can add your own engine. See Adding A Template Engine.