sort_by
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#
| Argument | Type | Required |
|---|---|---|
attribute | string | yes |
reverse | bool | no |
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.