{% if loop.index is divisible by(3) %}
  ...
{% endif %}

Copyright © 2023 Blutui.