-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
Being a programmer I got taken by surprise how the very handy "If" snippet works as I expected I could simply use it to test a boolean expression without having to specify an operator or operand.
Hence I would suggest the following change:
-
Set default operand to 1
This can be used then to use a snippet returning the result of a boolean expression as subject without having to specify an operand and would work as one expects. Example:
isSet snippet:
<?php return defined('SOME_CONSTANT') ?>
[[If? &subject=`[[isSet]]` &then=`true` &else=`false`]]
without that change, the logic is reversed which I find very confusing.
Metadata
Metadata
Assignees
Labels
No labels