sort_by

Signature
x | sort_by(attribute=, reverse=?)

Sorts by attribute (a path such as params.weight; "" or value: the elements): collation of the render’s lang, dates as instants, stable.

Arguments#

ArgumentTypeRequired
attributestringyes
reverseboolno

Details#

  • Kind: Filter, implemented by fugo.
  • Available in: every kind of template: layouts, partials, shortcodes and render hooks.
  • Output: escaped like any value, unless marked safe.

    Type to search titles, headings and text.