Forums / Cotonti / Support / variable inside {FILE construction

Eugene
#1 2012-01-30 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 2012-01-30 08:16
{FILE "themes/nemesis/inc/{PHP.foo}.tpl"}
May the Source be with you!
Eugene
#3 2012-01-30 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 ,,


Dit bericht is bewerkt door Eugene (2012-01-30 09:59, 13 jaren ago)
Trustmaster
#4 2012-01-30 10:46

Quotes are mandatory in FILE path. Try

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

the same...

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


Dit bericht is bewerkt door Eugene (2012-02-01 09:57, 13 jaren ago)