X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Displaying available variables in a template (https://forum.x-cart.com/showthread.php?t=14479)

swaylock 06-09-2005 03:30 PM

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

swaylock 06-09-2005 03:39 PM

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);

shan 06-10-2005 05:50 AM

http://forum.x-cart.com/viewtopic.php?t=17601

swaylock 06-10-2005 07:57 AM

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.