1

Prev and Next stop working after 100 entries.. There are no template errors. I can access the pages for the individual entries - but Next and Previous are blank.

Here is my set up...

{% set criteria = {section: 'posts'} %} {% set prev = entry.getPrev(criteria) %} {% set next = entry.getNext(criteria) %}

{% if prev %} my html ...{{ prev.url }} ...my html {% endif %}

The same holds true for next.

Once there was a template error referencing a null value on prev.url - and referencing an entry ID that no longer appears to exists. However, I discovered that I had had prev under if next. That is the only time I was able to produce a template error.

Hellyar
  • 921
  • 8
  • 21

1 Answers1

4

In your criteria, you need to set the limit to null as by default Craft only returns up to 100 entries.

See: Default Craft entry limit

Jeremy Daalder
  • 7,637
  • 13
  • 26
  • Oh wow, I did not realize that came into play here. I went ahead and added {% set criteria = craft.entries.section('posts').limit(null) %}. It worked. Thanks. – Hellyar Feb 07 '17 at 23:22