![]() |
Displaying available variables in a template
Hi all,
Hope I'm not jumping th gun with this question, but I have searched and couldn't find anything. I'm coming from a PERL background and in PERL there is a function/module called "dumper" that when used in a template context will print out all the key value variable pairs available in that template. This really helps during development. Is there anything like that with the SMARTY template engine? Any help would be great. Many thanks, Mike |
this may be the answer
From the smarty site faqs
Q: Is there an instruction to get all vars assigned to a template? (Mattia) A: Yes, using get_template_vars (Oscar Fernandez Sierra): // get all assigned template vars $tpl_vars = $smarty->get_template_vars(); // take a look at them var_dump($tpl_vars); |
|
Thanks!!
Many thanks!!!
:) |
All times are GMT -8. The time now is 02:07 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.