Files
Twig/doc/functions/random.rst
T
2011-12-18 12:16:35 +01:00

12 lines
228 B
ReStructuredText

``random``
==========
.. versionadded:: 1.5
The random function was added in Twig 1.5.
The ``random`` function returns a random item from a sequence:
.. code-block:: jinja
{{ random(['apple', 'orange', 'citrus']) }}