Template:Sort

From Wikipedia, the free encyclopedia

[[{{{1}}}]]

The template documentation below is transcluded from Template:Sort/doc [edit]

This template is for optionally sorting tables contents when that is a possible desired feature.

This 'Sort' template is implemented as a general solution according to Meta Help:sorting (Help:Sorting) which says:

For readibility a plain notation can be added after the coded form. If a blank space is used for separation, and no number code has a space at this position, then adding the plain notation does not affect the sorting order. If a number code can have a space at this position, two nbsps can be used. Moreover, display of the first part, acting as sortkey, can be avoided using CSS (this does not affect its functioning for sorting):

<span style="display:none">...</span>


To use it, place this in your table cell
|{{sort|Clinton, William Jefferson|[[Bill Clinton]]}}

It presently works through hidden CSS, as described at Help:Sorting. If a cleaner way of doing this is developed, the template will be changed. A table using this template should use it in all rows