Is there a way to put a for loop with both filters limit and offset like this:
{% for variant in product.variants offset: 11 & limit: 21 -%}
{%- endfor %}
???
Is there a way to put a for loop with both filters limit and offset like this:
{% for variant in product.variants offset: 11 & limit: 21 -%}
{%- endfor %}
???
In Liquid, the template language used by Shopify, you can indeed use both the limit and offset filters in a for loop to control the number of iterations and the starting point. However, the syntax is slightly different than what you’ve provided.
Here’s the correct syntax for using the limit and offset filters together in a for loop:
{% for variant in product.variants limit: 21 offset: 11 %}
{% endfor %}