MeltingDog
MeltingDog

Reputation: 15458

Modx: getResources - sort by id ascending/descending?

I want to try and order my resources by ID in ascending order.

Annoyingly, the documentation doesn't mention this though I am sure its possible.

Currently I have:

&sortby=`id`

Would anyone know the correct way to order by ascending or descending?

Thanks

Upvotes: 0

Views: 3574

Answers (1)

Phil
Phil

Reputation: 164881

Are you sure you're reading the correct documentation?

You should be able to use

[[getResources? &sortby=`id` &sortdir=`ASC` ...

Upvotes: 3

Related Questions