Toggle search
Search
Toggle menu
notifications
Toggle personal menu
Editing
Template:Sort/Documentation
Template page
Views
Read
Edit source
View history
associated-pages
Template
Discussion
More actions
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{merge|Template:Sortkey|"It's a very useful template, and in its current use, redundant to {{t|sortkey}}. The template has extra functionality besides sorting dates though, as it can sort anything, although so far we've pretty much just used these for dates. Either way, if extra functionality is wanted it should be merged into sortkey and if it's only to be used for dates it can be safely replaced and deleted."}} This template is for optionally sorting tables by specified sortkeys. ;Usage:<code><nowiki>{{</nowiki>sort|''sort value''|''displayed value''}}</code> If necessary, one can apply sorting using a sortkey that [[wp:Help:Cascading_style_sheets#Non-display|due to CSS is not displayed]]: <nowiki><span style="display:none">...</span></nowiki>. Javascript sorting is based on the text inside and outside the tags, without the tags themselves. A hidden sortkey can be put at the start. This template makes that more convenient. The first parameter is the sortkey; the second parameter is the wikitext of what has to be displayed. By default, this is the sortkey with link brackets. =====Example===== <pre> |{{sort|Brothers Karamazov|[[The Brothers Karamazov]]}} </pre> It presently works through hidden CSS, as described at [[wp: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. '''Note:''' You should always have the same number of columns for a given table. E.g., if the wikitable will be sorting the numbers 56 (foo), 94 (bar), and 103 (baz), then your templates within that wikitable should be <pre>{{sort|056|foo}} {{sort|094|bar}} {{sort|103|baz}}</pre> <noinclude>[[Category:Template documentation|N]]</noinclude>
Summary:
Please note that all contributions to Turing Complete are considered to be released under the Creative Commons Attribution-ShareAlike (see
TuringComplete:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Template used on this page:
Template:Merge
(
view source
)