Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
Subzero-mb Posted May 30, 2015 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
Ahmad E. Posted May 30, 2015 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.
Subzero-mb Posted May 30, 2015 Author 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
Recommended Posts
Archived
This topic is now archived and is closed to further replies.