🌍
English
hi,
i am adding some custom php codes to a piwigo .tpl file, how can i assign a template variable to a php variable
i . e
i want to assign $SRC_IMG to a custom php variable so $myvariable = $src_img value.
how it can be done
thans
Offline
thanks i have got it solved
Offline
Hi saqwild,
can you tell us you did it?
Offline
just do this in the .tpl file :
{php}
$myVar=$this->get_template_vars('myVar');
{/php}
;-)
Offline
exactly as was told by Grum
i.e
{php}
$my_file_name = $this->_tpl_vars['INFO_FILE'];
echo $my_file_name;
{/php}
Offline