I’m retaking this topic because I would like how to know implement a button to make all those projects to get sorted by the country.
i.e: Spain, Belgium, United States, Spain… → Spain, Spain, Belgium, United States…
I meant, all the projects are randomly sorted so I want to make the user by able to see al the following same countries one next to the other. Is it possible?
Yes, you can either implement this with a form, then put the nessary logic into your controller. Or go for a JavaScript based solution, e.g. http://listjs.com
I know that this stuff is not easy when you’re new to it. But if you don’t follow the instructions, we are not getting anywhere, I’m afraid.
Now, you have included list.min.js twice, once in the header (local assets) and once in the footer (from CDN). Also, you haven’t included the data-sort atttribute in your anker element (button).
Please keep in mind that this is a Kirby forum and we do our best we can to sometimes go the extra mile and help with non Kirby stuff. But in general, this is not what this forum can support. Thanks for your understanding.
I have edited my instructions above a bit, hopefully it is clearer now.