Url Sort By
Generates a collection URL with the provided sort_by parameter appended. This filter must be applied to a collection URL.
Accepts the following values:
title-ascendingtitle-descendingprice-ascendingprice-descendingcreated-ascendingcreated-descending
Example
liquid
{{ '/collections/GYM' | sort_by: 'price-ascending' }}Output
/collections/GYM?sort_field=price&sort_order=asc