Forum
Prev and Next links
Hello. I've successfully implemented this:
https://docs.grabaperch.com/perch/content/functions/how-do-i-link-prev-next/
I need the list to loop, so that when the last project in the list is displayed, the next link loops back to the first.
Is this posible?
Thanks.
Yes, if there's no next item, output the link to the first. The first is always a known URL.
Thanks. I'm not sure how I do that using this template:
It needs to work for the Next & Prev links.
What you need to do is if there's no next link, link to the first item.
Thanks Drew. I understand what you're saying, but I'm not sure how I go about implementing it?
The 'Next' button need to go to the first item if there no next item. The 'Prev' button needs to go to the last item if there's no prev item.
I'm drawing a blank on how I need to set up the template and page. Sorry.
Do you know how to filter a region to get the first result?
No idea.
I'm guessing I need to do something like this:
Any help appreciated.
Hi.
I think this is what I need for the 'Next' link, but I don't know what the 'if' logic should be.
Can you help please?
Thank you.
This is beyond the scope of Perch support but I'll leave it here in case someone else wants to help.