Default collection sort on CP? #9249
-
Is there any way to save a default sort for collections on control panel?. I know we can save the columns and its position but didn't find anything to apply a default sort. Can this be set on any YAML file? I don't want to make the collection orderable, just set a specific sorting on its index on control panel... Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
You can add |
Beta Was this translation helpful? Give feedback.
-
Thanks @ryanmitchell, it worked. I see now that I missed that on docs: https://statamic.dev/collections#default-sort-order-in-listings |
Beta Was this translation helpful? Give feedback.
You can add
sort_by
to your YAML (along withsort_dir
)eg
sort_by: my_field_handle