Fullscreen
Loading...
 
[Show/Hide Right Column]

Sort lines of text

Plugin Sort

This Wiki Plugin allows you to sort lines of text alphabetically in ascending or descending order, reverse the current sorting, or shuffle them. Since Tiki versions 6.5, 7.3 and 8.0, the sorting is natural and case insensitive.

Usage

To use this plugin in a wiki page, use the syntax:
{SORT(sort=>"asc|desc|reverse|shuffle")}data{SORT} - one data per line


Required parameters are in bold
Preferences required: wikiplugin_sort
Parameters Accepted Values Description Default Since
sort asc
desc
reverse
shuffle
Set the sort order of lines of content (default is ascending) asc



Note that the plugin treats the lines that {SORT()} and {SORT} are on as the first and last line. This may be changed in the future.

Example 1

This code,
^{SORT(sort=>asc)}Some messy lines
that need to be sorted
now we can
thanks to Oliver{SORT}^


Would produce:
now we can
Some messy lines
thanks to Oliver
that need to be sorted


Example 2 (natural sorting and case insensitive)

This code,
^{SORT()}
IMG0.png
IMG3.png
img1.png
img10.png
img12.png
img2.png
{SORT}^


Would produce:
IMG0.png
img1.png
img2.png
IMG3.png
img10.png
img12.png


And since Tiki 6.5, 7.3 and 8.0, it produces:

IMG0.png
img1.png
img2.png
IMG3.png
img10.png
img12.png


Related pages


External links


Contributors to this page: Marc Laporte9140 points  , Xavi67871 điểm  , lindon132 điểm  and system .
Page last modified on Monday 16 April, 2012 05:07:14 UTC by Marc Laporte9140 points .
The content on this page is licensed under the terms of the Creative Commons Attribution-ShareAlike License.

Site Language

Reference Guide

Keywords

These keywords serve as "hubs" for navigation within the Tiki documentation. They correspond to development keywords (bug reports and feature requests):



Tiki Newsletter

Delivered fresh to your email inbox!
Newsletter subscribe icon
Don't miss major announcements and other news!
Contribute to Tiki