3

Is this normal behavior?

{% for entry in entries %} 
{{ cycle(['<div></div>', '2', '3', '4'], loop.index0) }}
{% endfor %}

Results in:

&lt;div&gt;&lt;/div&gt;

2

3

4

is there a way to force the output as it is?

3

You can use Twig's "raw" filter to prevent the HTML from being escaped

{{ cycle(['<div></div>', '2', '3', '4'], loop.index0)|raw }}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.