Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Template Questions /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Boolean and null values in templates

Go to End



Community Member, 39 Posts

27 July 2016 at 6:49am


what would be the best way to use boolean and null values in method calls inside templates? See:

Some HTML.

Currently what happens with those examples is that words false, true and null are converted to strings, which obey to the old, deprecated template syntax that allowed us to write strings without wrapping them to quotes.

Is it possible at all, or should I just use 1 to indicate true and 0 to indicate false/null? I really would like to use strict data types inside my PHP class methods.

Thank you for your help! :)