str_modulo

Description

Print the input string every modulo occurences.

Syntax

{{ <string> | str_modulo: <index>, <modulo> }}

Example

{{ 'odd' | str_modulo: 1, 2 }}

returns

"odd"

Options

Name Type Description
index Integer The counter. Usually, the index variable within a for loop
modulo Integer By default, it is the current locale
© 2024 LocomotiveCMS Terms of use Privacy Policy
Back to top