5168 shaares
38 private links
38 private links
SuperSort provides a Twig filter sorting an array of objects, either using one of PHP's built-in methods to sort the actual objects, or using a custom sort method to arrange the array based on the rendered results of running each object through a Twig object template.
Using SuperSort's custom "sort as" methods, you can sort an array of elements by any accessible object value — including values from Matrix blocks, related elements, math calculations, etc.