4

I am looping through a matrix field and it appears to stop looping when the index reaches 100 but I have more than 100 blocks here. How can I loop through the remaining blocks?

{% for block in entry.myMatrixField %}
    {{ loop.index }}
{% endfor %}
user243
  • 161
  • 3

1 Answers1

2

The default limit for fetching elements is 100. This can be overridden as follows:

{% for block in entry.myMatrixField.limit(null) %}

Passing in null will grab all of them, or you can pass in the specific number you want:

{% for block in entry.myMatrixField.limit(400) %}
Brad Bell
  • 67,440
  • 6
  • 73
  • 143
user243
  • 161
  • 3