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". -
|ouireturns 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. -
|nonis the opposite of|ouiand is equivalent to|?{'',' '} -
|etis used to confirm the existence of 2 elements (logical AND) -
|ouis used to confirm the existence of either 1 or 2 elements (logical OR) -
|xouis 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".