Sort collection:previous and collection:next alphabetically #5305
Unanswered
bruceontheloose
asked this question in
Q&A
Replies: 1 comment 3 replies
-
Not sure you can sort a collection that has depth. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I would like the
collection:previous
andcollection:next
links to be sorted alphabetically (per a field such astitle
), rather than by date or manual sort order. The docs page forcollection:previous
says it's possible: "If you're on a single entry page and want to show previous entries in order (publish date, alphabetical, or manual), this is the tag you're looking for." (Thecollection:next
page is similar.) But I can't get it to work. I get:Here's the collection's config:
And here's the relevant template code (I've also tried
sort="title:desc"
andsort="title"
):I know I can make that error go away by turning on Orderable and setting Max Depth to
1
via the Configure Collection page in the control panel, and then usingsort="order"
in the template, but that's not what I'm after.How can I sort previous and next alphabetically?
I posted essentially the same question in the old forum in Sept right before it was archived in favor of Discussions here, so that might have been why it went unanswered. Hope you don't mind the repost.
Thanks in advance for any help,
Bruce
Beta Was this translation helpful? Give feedback.
All reactions