This repository has been archived on 2025-01-19. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
drupalcampbristol/vendor/twig/twig/doc/tests/divisibleby.rst
2018-11-23 12:29:20 +00:00

14 lines
312 B
ReStructuredText

``divisible by``
================
.. versionadded:: 1.14.2
The ``divisible by`` test was added in Twig 1.14.2 as an alias for
``divisibleby``.
``divisible by`` checks if a variable is divisible by a number:
.. code-block:: jinja
{% if loop.index is divisible by(3) %}
...
{% endif %}