Subzero-mb Posted May 30, 2015 Share Posted May 30, 2015 I am making some modifications in templates but the most easy thing I cannot do it. I can use php inside {{ }}, conditionals, functions whatever, but when I try to define a variable I received an error.It is very easy to test, just open in the ACP one template and include this code:{{ $var = 'test'; }}And when you tried to save it the ACP will tell you "This theme file cannot be saved". I have tried the test in many templates and it is always the same, even using other options:{ $var = 'test' } {{$var = array();}}But for the rest of php code as conditional and internal functions of php there is no problem. What am I doing wrong? Thank you Link to comment Share on other sites More sharing options...
Ahmad E. Posted May 30, 2015 Share Posted May 30, 2015 Just tested it with: {{$test="test";}} {$test}It outputs test just fine, might be worth mentioning in which template you are trying to do this. Link to comment Share on other sites More sharing options...
Subzero-mb Posted May 30, 2015 Author Share Posted May 30, 2015 It looks I have some error in my theme, because in a secondary theme I have I can define variables without problems. I am not sure what happen but it is just in this theme Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.