Extension:SimpleSort

The SimpleSort extension allows you to sort a list of items, contained in the same string.

Usage
Once installed you can use the  template invocation. It takes 1 or 2 arguments, depending on whether you are happy with the defaults or if you want to customize the sorting. The 1-argument form assumes a comma-separated list of items (ignoring and discarding whitespace around the commas), and sorts them in ascending order, case-insensitive, following php's "natural" sorting order:
 * This produces output
 * This produces output

Optionally, you may specify as a first argument one or more options, each separated by whitespace. Available options are: For example,
 * Use descending rather than ascending order.
 * Use regular alphabetic ordering.
 * Use regular numeric ordering.
 * Use a case-sensitive comparison.
 * Use  as an item separator to recognize items.  Whitespace around   will still be ignored and discarded.
 * Use  as an item separator in the sorted output.  The default is to use the same string as
 * Discards all list items after the first blank entry.

Keyed Sorting
The sorting order may also be given by sorting one list, applying the resulting ordering to a second list. For this you need to use the  option as (one of) the first argument(s) to , and to supply two lists. The sort order generated by the first list is then used to reorder the second list, and only the second list is output. For example, Other options described above can also be used in conjunction with. For example, Note, however, that the input separators must be the same for both lists, and (of course) the output separator is only applied to the second list. If the first list is shorted than the second then remaining items in the second list are discarded. If the first list is longer than the second then blank entries will be used to fill out the output.