Just like the criteria used for loops, comparison filters can also be applied to tags with the following "pipe" syntax:
[(#TAG|operator{value})]
The list of applicable operators includes:
-
==(confirms equality) -
!= -
> -
>= -
< -
<=
Just like the criteria used for loops, comparison filters can also be applied to tags with the following "pipe" syntax:
[(#TAG|operator{value})]
The list of applicable operators includes:
== (confirms equality)!=>>=<<=[(#TITRE|=={Chocolate}|oui)
Some chocolate!
]
[(#TEXTE|strlen|>{200}|oui)
This text is longer than 200 characters!
]
[(#TITRE|=={Chocolate}) Some chocolate!] would, if the test evaluates to true, display “1 Some chocolate!” (since 1 indicates a true value in PHP). But adding the |oui filter (French for yes) allows you to hide the results of the test.
Author Published : 07/12/09 Updated : 12/03/23
Translations : English, français, Nederlands