This seems to show "Hello world" if foobar is defined
<#if foobar??>
Hello world
</#if>
If foobar is a boolean, what do I use to write Hello world if foobar is both defined AND true?
The shortest I can think of is specifying a false default value:
<#if foobar!false>
Hello world
</#if>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With