There are several filters used for tests and logical operations. These are the filters "?", "sinon" (else in French), "oui", "non", "et", "ou", "xou" which are generally used in most cases.
-
|?{vrai,faux}
returns "faux" (false in French) if what is input to the filter is empty or null, otherwise it returns "vrai" (true in French) - this might be better interpreted in English as "boolean_does_this_thing_have_a_value". -
|sinon{this text}
returns "this text" only if what is input to the filter is empty, otherwise it simply returns that same input - this might be better interpreted in English as "but_if_empty_put_this_instead". -
|oui
returns either a space or nothing. It is equivalent to|?{' ',''} or |?{' '}
and is used to return a non-empty content (a space) to indicate that the optional parts of the tags should be displayed. -
|non
is the opposite of|oui
and is equivalent to|?{'',' '}
-
|et
is used to confirm the existence of 2 elements (logical AND) -
|ou
is used to confirm the existence of either 1 or 2 elements (logical OR) -
|xou
is used to confirm the existence of one, and only one, of the two elements (logical XOR).
In addition, SPIP will also understand the English equivalents for these: "yes", "not", "or", "and" and "xor".