We are transitioning over to a new forum platform. Please post new issues there. Existing threads will be dealt with here unless you choose to move them over. Visit the new forum
Sorting a Collection by Multiple Fields
What is the syntax to sort a colleciton by multiple fields? I have found an example to filter by multiple field value, so though the syntax might be similar but I can't get that to work.
Here's what I have now
perch_collection('Tours',array( 'template' => 'tour_covers.html', 'filter' => [ [ 'filter'=>'TourFilter', 'match'=>'contains', 'value'=> $FilterValue, ], [ 'filter' =>'Title', 'match' => 'neq', 'value' => '', ], ], 'sort' => "Title', 'sort-order' => 'ASC', 'count' => 99 ));
I would like to sort the collection two fields - by Location and then Title.
Many thanks James
Want to reply to this thread?Login with Perch