I am looking to loop through an array of items that I have. I did not realize at first that a Liquid for loop only can go up to 50.
Shopify wants us to use the Paginate function in this case. What I did was just wrap the paginate function around the for loop and set it to 55 which is what I needed.
Does this improperly use any of Shopify’s resources?
Is it okay that I am not actually creating a page while using paginate, or ajax refresh? This is for rendering small color swatches (and I simplified the meta field code in this example)
Original - This only can go through 50 times and simply stops running after 50
{%- for field in metafield.value -%}
{%- endfor -%}
Workaround: adding this pageinate tags
{%- paginate field in metafield.value by 55-%}
{%- for field in metafield.value -%}
{%- endfor -%}
{%- endpaginate -%}
shown in the documentation but I did not need to use any filters, and I am not even sure really how the filter would work
{{ paginate | default_pagination: next: 'Older', previous: 'Newer' }}
Shopify Resource: https://shopify.github.io/liquid-code-examples/example/simple-pagination