getCatalogData
query supports customizable sorting to help control the order in which catalog items are returned. This is particularly useful when users need to view trainings by title, date, or duration.
Sorting is configured using two arguments: sortKey
and reverse
.
Argument | Type | Description |
---|---|---|
sortKey | CatalogSortKeys | Specifies the field to sort by. See available options below. |
reverse | Boolean | If true , reverses the sort order (e.g., from ascending to descending). Default is false . |
reverse: true
to sort in descending order.sortKey
ValuesSort Key | Description | Underlying Field |
---|---|---|
TITLE | Sorts trainings alphabetically by title | Training title |
DURATION | Sorts by the training’s duration label | Duration taxonomy label |
PUBLISHED | Sorts by publication date | Entity publication timestamp |