access variable in email template

I have enabled {php} for testing purpose in “Send to friend” email template.

Have placed this code to list all varaibales

print_r(get_defined_vars())



This is output example:

[this] => Templater Object

-----------[lang_code] => EN

-----------[_tpl_vars] => Array

----------------------[send_data] => Array

---------------------------------[to_name] => John



I can access [to_name] value by using $send_data.to_name

but I need to access [lang_code] variable using smarty. Its seems I am limited to [_tpl_vars] array.

I have tried $lang_code, $this.lang_code, does not work.



Can somebody help me, maybe there is some special syntax to do so?



Thanks

{$smarty.const.CART_LANGUAGE}



Don't use PHP tags in templates. Almost everything you will ever need is available via smarty unless you need to do something like update a session variable.

[quote name=‘tbirnseth’ timestamp=‘1330643728’ post=‘132429’]

Don’t use PHP tags in templates. Almost everything you will ever need is available via smarty unless you need to do something like update a session variable.

[/quote]



Yes, I know that. I just don’t know another way how to list all available variables in tpl.

As I understand, print_r(get_defined_vars()) list php variables, not smarty.



Is there any way to list all smarty variables?



“Template debugging console” works only for admin side for me :-(



thank you tbirnseth!

{debug}

will generate a pop-up listing all template variables in context at the point of the {debug} tag.

Thank you tbirnseth,



you are my saver! :)