I have combed through similar questions, although my pagination links are not performing properly.
I would like to add pagination links to entries within a channel. And I would like for the pagination order to be pulled from an Entries field within a Matrix located within a Single entry.
So far I have:
{% set source = craft.entries.sectionId(10).first().gallery.type('gallery').first().entries.relatedTo(entry) %}
{% set prevEntry = entry.getPrev(source) %}
{% set nextEntry = entry.getNext(source) %}
<a href="{{ nextEntry.url }}">Next: {{ nextEntry.title }}</a>
<a href="{{ prevEntry.url }}">Previous: {{ prevEntry.title }}</a>
Where SectionId(10.first() is pulling the Single entry and gallery.type('gallery').first().entries is pulling the Entries field within the Matrix.
Unfortunately this is producing blank Next and Previous links.
<a href="">Next: </a>
<a href="">Previous: </a>
I have referred to other questions regarding params and relations, although through experimenting with different solutions I am not queuing up the correct Next and Previous entries.
Neither is Craft providing any error reports regarding the blank state.
Any help is greatly appreciated.