|?{ifyes, ifnot}

The |?{ifyes,ifnot} filter was introduced in SPIP 1.8, 1.8.1. It is an enhanced version of |sinon. It accepts either one or two parameters:
-  ifyes if the value to display instead of the filtered element if that element is not empty.
-  ifnot is optional, and is the value to display if the filtered element is empty.

[(#TEXTE|?{#TEXTE, "no text here"})] displays the contents of the #TEXTE tag if it has been entered, otherwise it displays "no text here" when it has not.

Author Mark Published : Updated : 26/10/12

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