Announcement

#1 2010-07-11 13:56:49

saqwild
Member
2009-06-13
64

[resolved] template variable as php variable

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

 

#2 2010-07-18 20:07:30

saqwild
Member
2009-06-13
64

Re: [resolved] template variable as php variable

thanks i have got it solved

Offline

 

#3 2010-07-29 17:57:31

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13791

Re: [resolved] template variable as php variable

Hi saqwild,

can you tell us you did it?

Offline

 

#4 2010-07-29 20:03:57

grum
Former Piwigo Team
Pantin
2007-09-10
1371

Re: [resolved] template variable as php variable

just do this in the .tpl file :

{php}
      $myVar=$this->get_template_vars('myVar');
{/php}

;-)


My pictures with Piwigo, of course !
[ www.grum.fr ]

Offline

 

#5 2010-07-29 22:20:43

saqwild
Member
2009-06-13
64

Re: [resolved] template variable as php variable

exactly as was told by Grum
i.e
{php}
$my_file_name = $this->_tpl_vars['INFO_FILE'];
echo $my_file_name;
{/php}

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact