New answers tagged

1

I would like to thank Michael Rog for supplying an answer at this similar question about SuperSort: Sorting an array of entries according to a fixed list/array of items The code that lets me sort by instrument in any order I want: {% set relatedMusicians = craft.entries.section('bios').relatedTo(entry) .with(['bioPhoto']) .all() %} {% set ...


1

As of SuperSort 3.1.0, you can use the customOrderSort and customOrderSortAs methods to accomplish this: {% set shops = craft.entries.section('shops')... %} {% set customOrderList = [ 'SomeShopType', 'AnotherShopType', 'OneMoreShopType' ] %} {% set sortedShops = shops | supersort('customOrderSortAs', as='{shopType}', comp=customOrderList) %}...


Top 50 recent answers are included