Hello I am trying to do the same thing as the person who posted this:
I was happy to see that jmooring offers a great solution:
I am not a very capable programmer nor git user but I was able to download the git repo and add the files:
layouts/_partials/build-page-collection.html
layouts/_partials/nav-prev-next-guides.html
to my theme.
Hugo reports:
execute of template failed: template: _partials/nav-prev-next-guides.html:5:15: executing “_partials/nav-prev-next-guides.html” at <$pc.Reverse.Prev>: can’t evaluate field Reverse in type interface {}
<nav class="nav-inline">
<ol>
{{ with $pc.Reverse.Prev . }}
<li><a href="{{ .RelPermalink }}">Previous</a></li>
{{ end }}
(Sorry, I pasted the code in once and got 2 code blocks and do not see way to delete the top one)
Include a link to the source code repository of your project, because we really need the context of seeing your templates and partials to be able to help you. It is trivial to do a quick git clone on your repo, then run hugo server in your project, to help you out. On the other hand, recreating your code from screenshots, or sort of guessing at it, is not.
If you can’t share your repository for whatever reason, consider creating a dummy repo that you can share, which reproduces the problem you’re experiencing.
I had read thru the Requesting Help section but I did not provide a link to the source code of my repo because I am a little embarrassed to say that unfortunately I do not know git.
I am a retired engineer with limited IT skills although I hope to learn git in future. For my purposes at this time, I rev things in a different way.
I tried to debug this by first of all installing a fresh copy of Hugo and making only the minimal changes to it to implement the Previous and Next links:
I installed hugo v0.152.2+extended linux/amd64 BuildDate=2025-12-14T00:00:00+00:00 VendorInfo=Fedora:0.152.2-1.fc43
And placed them in site (not theme) layouts/_partials/
In page.html in /theme/layouts/ I added:
{{ partial “nav-prev-next-guides” }}
I then restarted Hugo and the same error occurred:
execute of template failed: template: _partials/nav-prev-next-guides.html:5:15: executing “_partials/nav-prev-next-guides.html” at <$pc.Reverse.Prev>: can’t evaluate field Reverse in type interface {}
Is there maybe some additional code I need to add to support the evaluation of field Reverse ?