|div

  • New in : SPIP 1.9

The |div{xx} filter is a mathematical operation filter. It returns the results of dividing (the quotient) the value of the tag by the xx argument passed to the filter.

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

It is possible to assign a negative number as the argument to the filter: [(#TOTAL_BOUCLE|div-5.2)].

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|div{5.2})].


See also the |modulo, |mult, |moins and |plus filters.

Author Mark Published : Updated : 15/07/23

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