The filter |set{name} affects the current value of the variable name. It is sometimes more convenient alternative, to the tag #SET{name,value}.


[(#GET{length}) characters]

is the equivalent to

[(#GET{length}) characters]

The second argument of the |set{} filter, if not null, indicates to "continue", that is, pass the value in the sequence of filters, or display it if placed at the end of the chain:

[(#TEXTE*|set{plain,1}|propre|set{process,1}|mb_strlen|set{length,1})] stores the plain text in the variable plain, the text processed in process, the number of characters in length, and eventually displays the value length.
See also |setenv

The |set filter was introduced in SPIP 2.1 and SPIP 3 on 3 June 2014.

Author jack Published : Updated : 30/11/20

Translations : English, français, Nederlands