Let’s say I have a smarty template file with the following content:
<div>
var 1: {$var1}<br>
var 2: {$var2}
</div>
and I do the following assignment where I forget to assign var2:
$smarty->assign("var1", "foo");
$smarty->display($tpl_file);
What is the best way to detect that not all the required variables
were assigned?
Thank you.
Smarty itself does not have such a function, you can try to write something your own like:
Taken from here: http://smarty.incutio.com/?page=SmartyFrequentlyAskedQuestions#project-10