Skip to content

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-ascending
  • title-descending
  • price-ascending
  • price-descending
  • created-ascending
  • created-descending

Example

liquid
  {{ '/collections/GYM' | sort_by: 'price-ascending' }}

Output

/collections/GYM?sort_field=price&sort_order=asc