static
static copied to clipboard
Reverse ordering of collections
Hi!
I was wondering whether it was possible to reverse the order of a collection? I'm trying to show blog posts from latest to oldest but for some reason I'm not able to do it. Any help is appreciated.
Thanks!
Hey @arunvickram, yep. You should be able to pass that like so:
<ForEach content="post" as="post" orderBy="date,desc" count="{count}">
...
</ForEach>
This will order by date in desc order. Or you could specify asc to ascending order. Let me know if that helps :)
Thanks!