XF 2.1 Sort results on page

Cupara

Well-known member
I know how to sort results using the $finder->order() method but what I can't figure out is how to sort a specific field.

So right now I have it set up to display all results based on default sort of id, what I need is to be able to sort by another field when viewing the list of results on the admin page. How do I go about that without using $finder->order('display_order', 'ASC'); as that would override the id sort order.

Thanks
 
Can't you do an array with order?
Code:
$finder->order([
    ['result_id', 'DESC'],
    ['display_order', 'ASC']
]);
 
Back
Top Bottom