I’ve been enjoying using .PrevInSection and .NextInSection in my template to provide navigation links to the previous and next page in the current section (e.g. /content/cats/).
However, I want to do the exact same thing with the root “section” (e.g. /content/) and this seems to be very tricky to do. When I’m in the root “section” (not sure what it’s called in Hugo terminology), .PrevInSection and .NextInSection both seem to be empty as I suppose it’s not considered a section at all to Hugo.
.Prev and .Section do contain entries; however, they don’t ONLY contain pages in the root section, but also in sub sections as well. This means that if I use .Prev and .Next, I end up getting pages from /content/cats/ and /content/dogs/ showing up instead of only things that are directly in /content/.
Is there any way to just get the /content/ pages (immediate children) with prev/next?