Foren / Cotonti / Support / variable inside {FILE construction

Eugene
#1 30. Januar 2012, 07:45

Is there a way to include PHP variable (from module or plugin) inside construction {FILE "themes/nemesis/foo.tpl"}  ?

like if $foo changing value and i put {FILE "themes/nemesis/inc/$foo.tpl"}

Trustmaster
#2 30. Januar 2012, 08:16
{FILE "themes/nemesis/inc/{PHP.foo}.tpl"}
May the Source be with you!
Eugene
#3 30. Januar 2012, 08:54

thanks, man!

I didn't check that double brackets will work...

...
but as checked, I see that text inside of {FILE become "static" - example

$foo = '"themes/nemesis/inc/agro.tpl"';

line in template: {FILE {PHP.foo} }

browser give me: {FILE "themes/nemesis/inc/agro.tpl" } - but not the content of agro.tpl - which is the function of {FILE ,,


Dieser Beitrag wurde von Eugene (am 30. Januar 2012, 09:59, vor 13 Jahre) bearbeitet
Trustmaster
#4 30. Januar 2012, 10:46

Quotes are mandatory in FILE path. Try

{FILE "{PHP.foo}"}
May the Source be with you!
Eugene
#5 30. Januar 2012, 18:59

the same...

So, does it work on other sites or it's a bug?


Dieser Beitrag wurde von Eugene (am 1. Februar 2012, 09:57, vor 13 Jahre) bearbeitet