--- url: https://developer.youcan.shop/themes/filters/urls/urlSortBy.md --- # 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' }} ``` ::: tip Output `/collections/GYM?sort_field=price&sort_order=asc` :::