• New in : SPIP 1.6

The |sinon filter displays the argument that is passed to it if the tag to which it is applied returns an empty result:

[(#TEXTE|sinon{"there is no text"})]

will display the contents of the #TEXTE tag if that field is not empty, otherwise "there is no text" if #TEXTE returns nothing from the database.

The filters argument can be more complex than just a simple text string:

[(#TEXTE|sinon{#INCLURE{fond=my_page, env, id_article}})]

See also

Other test filters

Logical filters

Author Mark Published : Updated : 22/07/23

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