jan-vince / smallrecords

OctoberCMS plugin to store and manage records and lists
MIT License
30 stars 11 forks source link

please help to make categoryDetail component sortable descending #86

Closed Hessel91 closed 3 years ago

Hessel91 commented 3 years ago

Hi, record details component is sortable by date, however, categoryDetails component is not. I copied the code and looked, changed again for hours but somehow I can't make it work. Yes I know I'm not that good of a developer but I try my best. Can you please tell me how to make this component sort descending by date?

jan-vince commented 3 years ago

Hi @Hessel91,

categoryDetail component is meant to get one category. What exactly do you want to sort?

If you get category records from code like {{ category.records }} you should add records component along with categoryDetail. In records component you can define category slug and also sort order.

Hessel91 commented 3 years ago

Thank you for your reply. your answer made me review my actions and I figured out that I had to check the records component checkbox for: "Filter by main category" on the category detail page for my issue to solve. thanks.