Knowledge Base - Tutorial Ordering plugin for Sobi2
If you use this plugin, the choice of the order made within the parameters of SOBI is no longer used.
The plugin allows to change the sort order of entries in the list of entries in each category as well as the Result of research. There are two methods of sorting through this plugin: sorting chosen by the administrator, and sorting that the user can choose (according to the fields allowed by the administrator). In addition to the entries that have the same value, a second sort key can refine the sorting.
Administrator sorting choice
It is the administrator who chose the field that sort entries. In our example, the field chosen is heigth. This means that entries will be sorted by this field. If the administrator has not chosen any value, they will be sorted according the Sobi setting.
As in the example below, the entries are sorted well from the heigth field.
In the case of same sorting values (in our case the entries 'Le titre 7' and 'Le titre 3', whose heights are 160cm), the plugin use the the ID of the entries to put theses 2 entries in the order. Similarly entries without values (no height selected) are placed at the end in the order of their ID.
It is then possible to add a second sort key, in order to replace that ID sorting by another sorting key. This sorting key cannot be a field, but is a value, like hits, publication date, ... This option can also be hidden to the user.
User sorting choice
The administrator check in the backend a list of fields from which the user can choose the values of sort.
The administrator can select a value in the combo, and also in the checkbox for the user list. In this case, entries are sorted:
- By default, ie as the user does not choose any sort key (leaving the option 'Default') is the value chosen by the administrator who is used
- Once the user selects a value in the list, this is used for sorting entries.
If the administrator has not chosen any value, and the user leaves the combo to 'Default', the Sobi setting is used.
- << Prev