Quantcast
Channel: Print all variables available in a Smarty template - Stack Overflow
Browsing latest articles
Browse All 5 View Live

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 Article



Answer 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 Article

Answer 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 Article

Answer by Thinker for Print all variables available in a Smarty template

var_dump($Smarty->_tpl_vars);From the Smarty code :)

View Article

Print 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

Browsing latest articles
Browse All 5 View Live




Latest Images