search:sort
Description
The sort directive for selecting how the data on the page should be sorted. The sort tag should be wrapped in a Layout Controls Tag.
Usage
<search:sort response="{string}" fields="{string}" [default-label="{string}"] [title="{string}"] [default-order="{string}"] [mode="{string}"]> </search:sort>
Directive info
- This directive creates new scope.
Parameters
Param | Type | Details |
---|---|---|
response | string | The name of the response |
fields | string | Fields to provide sorting on (comma-separated). |
default-label (optional) | string | Label to display for the 'default' sort option when no specific sorts are applied. Usually implies sorting on score or relevance. Default: 'relevance' |
title (optional) | string | Add a title to display. Default: 'Sort by' |
default-order (optional) | string | Attribute to set the default sort order of Sort Fields (asc or desc). Default: 'asc' |
mode (optional) | string | The mode in which the sorting should work, be default click. click: Selecting a sort will sort in the default order, when clicking on a selected sort this sort will be removed, to change the order use the ascending and descending options at the bottom of the dropdown. toggle: Selecting a sort will sort in the default order, when clicking on the selected sort again it will reverse the order. |