[ar] [ast] [bg] [br] [ca] [co] [cpf] [cs] [da] [de] [en] [eo] [es] [eu] [fa] [fon] [fr] [gl] [id] [it] [ja] [lb] [nl] [oc] [pl] [pt] [ro] [ru] [sk] [sv] [tr] [uk] [vi] [zh] Espace de traduction


|?{ifyes, ifnot}

July 2010 — updated on : June 2010

All the versions of this article:

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.

Show the template of this page Site powered by SPIP | Translation area | Private area