Echo a variable only if it exists
Notice: This thread is very old.
- netteman
- Member | 129
Hello
I want to echo a variable in my template only if the variable exists.
I found out that this code works
Latte
I had to add @ to the condition because I got “Undefined variable: var” error otherwise.
Is it OK to avoid this error by using @ or is there something else I should use in latte/templates?
Thanks
Last edited by netteman (2016-05-01 11:30)