• New in : SPIP 2.0

The |oui filter [1] returns either a space or nothing at all.
It is equivalent to |?{' ',''} , and is used to return a non-empty content (a space) to indicate that the optional parts of the tag should be displayed.


[(#TITRE|strlen|>{30}|oui) This title is a long one]

However, please note :
Because it replicates the behaviour of the PHP if($var) test, the [(#VARIABLE|oui)] filter will return "FALSE" (i.e. nothing) if #VARIABLE is equal to "0" (zero) or is "null" or is not defined.

So with &a_variable =0 in url, writing


will return nothing.

To test a variable even if it is equal to "0" (zero) we use:


See also

Other test filters

logical filters


[1This can also be written as |yes

Author Mark Published : Updated : 08/07/23

Translations : català, English, Español, français, Nederlands