I have a base template that then builds sub-templates.
Template side:
<header>
{onload;file={var.flag;if [val]=1;then 'nav.tpl';else ''}}
</header>
<main>
{onload;file={var.templatePath}}
</main>
So the main
tag is populated with the sub-template, but the header is not. It is saying, TinyButStrong Error in field {var.flag...}: the key 'flag' does not exist or is not set in VarRef. (VarRef seems refers to $GLOBALS) This message can be cancelled using parameter 'noerr'.
, but in fact it does exist in the VarRef
array along with templatePath
.
Php Side:
global $templatePath, $flag;
$this->tbs->LoadTemplate($pageTemplateFile);
if(true){$flag = 0;}
$this->tbs->Show();