filter_random (zotonic_mod_base v1.0.0-rc.17)

Returns a random value from a list of values. When the input is an empty list or not a list then the result is undefined.

For example:

{{ ["a","b","c"]|random }}

The output of this is one of “a”, “b” or “c”.

See also

randomize, rand

Summary

Functions

random/2

random/3