HubDB & Hubl: Sort by most recently added with &orderBy=-hs_created_at
Nov 2, 2020
--
No long story. You know it’s available, but documentation is all over the board with mixed verbiage and gets a little tricky to reason out query params — orderBy + createdAt.
Turns out there is a prefix and a minus to flip the order to most recent.
Try this:
{% for row in hubdb_table_rows(‘name_of_hubdb’, ‘&orderBy=-hs_created_at’) %}
Good luck √ Hope this helps + Pass it on