We've retired the forum in favor of GitHub Discussions.

New conversations can be started on GitHub. Existing conversations will remain for a while longer.

Head over to GitHub →

Bug with or in conditionals

Curtis Blackwell December 23, 2014 by Curtis Blackwell


This works:

{{ cols_2 or "col-xs-12 col-sm-7" }}

…but this doesn't:

{{ cols_2 or 'col-xs-12 col-sm-7' }}

When using or in conditionals, strings have to be wrapped in double-quotes; single-quotes don't work. This is a problem when vars are used as a class name.

>>>>>>> Unanswered <<<<<<<
0 Replies
1 Follower