Entry Sorting

The entries in automatically generated tables of contents are normally sorted in ascending order by file name. For each folder, however, you can individually determine the way its subfiles are to be sorted.

These settings for sorting are only effective, however, if no sort key is given in the NPSOBJ instruction concerned. The sort keys are determined in NPSOBJ tags with the parameters sortkey1, sortkey2, and sortkey3 (primary, secondary, and tertiary criteria) as well as the modifiers sortmodifier1, sortmodifier2, and sortmodifier3 in accordance with the following example:

<npsobj list="toclist" sortkey1="field-name"
  sortmodifier1="alpha ascending">
  ...
</npsobj>

Instead of field-name enter the name of any file or content field. In the example above, the files will be sorted in ascending order (alpha ascending is the default and thus does not need to be specified). Use code according to the following example to have the files sorted numerically descending instead of alphabetically ascending:

<npsobj list="toclist" sortkey1="field-name"
  sortmodifier1="numeric descending">
  ...
</npsobj>

As shown in the examples above, the modifiers alpha and numeric can be combined with ascending and descending. If file sorting is determined neither in the NPSOBJ tag nor by the sort keys of the folder containing the files, then the Content Management Server tries to use the field specified by means of the content.sortKey system configuration entry. If no sort key can be determined there either, then the Content Management Server sorts the files by their names.

The sort order also affects automatically generated navigation entries.