views:

1190

answers:

3

I have some variables inside a template and i dont know where i assigned them, so i need to know what inside this variable is

say i have a var in smarty called member

i tryed with {debug} but it didnt work, no popup was shown. How can i debug smarty variables using something like var_dump() inside the templates ?

A: 

try this .... Set $debugging to TRUE in Smarty.

Webbisshh
sure i know that, but i need to do it without modding the core php files
streetparade
+2  A: 

You can use {php} tags

try:

{php}

$var = $this->get_template_vars('var'); var_dump($var);

{/php}

Let me know if this helps.

pinaki
Ohh Yes This worked a big thanks, and have a nice Day :-)
streetparade
+4  A: 

I think this might work:

{$var|print_r}

or

{$var|var_dump}
Tom Haigh