Sort mode
Design
How it works
Sort modes are displayed on the search page (and on my boards page).
Each cursor menu can have its sort mode.
Default is :
Most recent
Recently updated
Sort modes should be standard database sort modes (numerical / alpha, ascending / descending)
Advanced Configuration
Introduction
The sorting modes of the Home (Dam objects search) and Boards pages are configured according to the same syntax but in two different places to allow a more precise customization :
The Home sorting modes must be described inside JSON files located in the
dam/explore/sort
subdirectory. Sorting modes can be configured bycursor
, the one used by default for allcursors
can be found in the default-cursor-config.json fileThe Boards sorting modes must be described in the sort.json file located in the
board/boards-view
subdirectory.
The preceding sorting modes are described as an Array<Sort>
with the following default settings :
Config Path | Default value | Description |
---|---|---|
| [
{
"value": "created desc",
"i18n": "dam.sort.created.desc",
"default": true
},
{
"value": "modified desc",
"i18n": "dam.sort.modified.desc"
}
] |   By default, displays the most recently created DAM objects  Sorts the DAM objects by putting the last modified ones first |
Â
Each Sort
object has the following structure :
Property | Type | Mandatory | Default | Description |
---|---|---|---|---|
|
|
|
| Its value respects the SQL
|
|
|
|
| I18n key displayed in as a drop-down list entry label |
|
|
|
| True to use by default and displayed as such in the drop-down list |
Adding a sort mode
You just have to add a new Sort
object in an array inside the correct configuration file (see introduction). The sorting method must be done on an existing property, possibly with adding a i18n key (to customize the display of the property).
This following example sorts on the descending object Ids
:
[
...
{
"value": "id desc",
"i18n": "dam.sort.id.desc"
}
]
Deleting a sort mode
Simply remove the Sort
object from the array inside the correct configuration file (see introduction).
Others configuration options
To complete : List what is possible, but no documentation for now