|plus

The |plus{xx} (French for "add") filter is a mathematical operation filter.
It returns the results of adding (the sum) the value of the tag and the xx argument passed to the filter.

  • New in : SPIP 1.9

If the tag’s output is not a numeric type, it will be considered as being 0 (zero) and the filter will simply return its own argument:[(#TEXTE|plus{18})] will return "18".

It is possible to assign a negative number as the argument to the filter:[(#TOTAL_BOUCLE|plus{-5.2})], but this would undoubtedly be more clear if we were instead to use the |moins (subtract) filter.

Warning: if xx is a floating point number, it must be written with a period as per the English method as opposed to being written with a comma as some European languages do:[(#TOTAL_BOUCLE|plus{5.2})].

See also

Other mathematical operation filters

Author Mark Published : Updated : 21/07/23

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