Hello!
I’m looking for a simple way to update the sorting of a collection (like a feed of blog articles) with buttons. Like, if the table starts as date asc, but on button click it is sorted as title asc.
I’ve been looking for more documentation but not finding much.
I see https://listjs.com/ may be an option, but am wondering if Kirby has anything built in.
Also curious to find a working list.js x kirby cms example to study.
Okay, good to know. How would I pull data from the backend of Kirby?
Would it be just a PHP function with the first point you mentioned? Just trying to figure out what to google haha. Let me know if you might be able to point me to other resources. Thanks for your help.
Your button could just be a link as well, then you could do it like described here: Filtering with tags | Kirby CMS, with the only difference that you would not filter but sort
A form submit button would work similar to the search described here: Search | Kirby CMS, again with the difference that you would not return the search results but a resorted collection.