Contents
SortBy
Description
The SortBy macro will take a wiki table of data and sort it by the criteria you specify, similar to the functionality you’d expect from a spreadsheet program. This macro can be useful for such tasks as building internal phone lists, etc.
Download & Release Notes
Download |
Release Version |
Moin Version |
Release Notes |
|
1.7 |
Small update to work on 1.7 |
|
|
1.5 & 1.6 |
|
Usage
[[SortBy(page, num_headers, column, sort_type [,othercolumn, sort_type]...)]]
Example
Sorting a phone list:
The following example will take the 'PhonelistData' from another page and sort it <<SortBy(PhoneListData,1,1,alpha)>>
Name
Email
Phone
Bill
x.456
Carl
x.234
Albert
x.123
becomes...
Name
Email
Phone
Albert
x.123
Bill
x.456
Carl
x.234
Copyright
License
Bugs
The macro cannot handle unicode, when processing a german umlaut like äöü i get the following error in MoinMoin Version 1.5.8
UnicodeDecodeError 'ascii' codec can't decode byte 0xc3 in position 46: ordinal not in range(128)
Discussion
See also FeatureRequests/SortableTables.