Closed kirtanbodawala closed 7 years ago
I don't believe that either define
or invoke
are implemented in handlebars.php
. You can either implement it yourself or define it as a helper and use partials to achieve what you want.
Got the solution..! To make invoke work inside of the define helper you have clone the define and inserted it into invoke. Just add below lines inside Helpers.php in helperInvoke function:
$this->tpl["INVOKE"][$args] = clone($this->tpl["DEFINE"][$args]);
if ($this->tpl["INVOKE"][$args]){
return $this->tpl["INVOKE"][$args]->render($context);
}
In the following example, I have multiple menus with submenu and that submenu also has the submenu.