Hi all,
I would like to create a “Next” and “Previous” link for the pages in a section, but I can’t figure out how to make it work. Right now I have this:
<p><a href="{{ page.earlier | safe }}">Next</a></p>
in my page template, but this only gives me an [object]
, not a path to the earlier page. I have set sort_by
to "date"
. I thought I might be able to do page.earlier.permalink
but this throws an error:
Reason: Variable `page.earlier.permalink` not found in context while rendering
Grateful for any help!
K