↧
Answer by Louis Ferreira for Print all variables available in a Smarty template
$all_tpl_vars = $smarty->getTemplateVars();var_dump($all_tpl_vars); //before pushing to the templateexit;
View ArticleAnswer by John Magnolia for Print all variables available in a Smarty template
Updated answer for Smarty 3: getTemplateVars// If no parameter is given, an array of all assigned variables are returned. $all_tpl_vars = $smarty->getTemplateVars();
View ArticleAnswer by Aron Rotteveel for Print all variables available in a Smarty template
Use {debug}From the manual:{debug} dumps the debug console to the page. This works regardless of the debug settings in the php script. Since this gets executed at runtime, this is only able to show the...
View ArticleAnswer by Thinker for Print all variables available in a Smarty template
var_dump($Smarty->_tpl_vars);From the Smarty code :)
View ArticlePrint all variables available in a Smarty template
How do you print all variables available in the context of a Smarty template? Something like the Django debug trace that lists everything being passed.Thanks
View Article