Toggle search
Search
Toggle menu
notifications
Toggle personal menu
Editing
Template:Sortkey/Documentation
(section)
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!
==Usage== ;First unnamed parameter The most useful feature of the template is creating chronological sortkeys by using a date. Most date formats will be recognized, such as "January 1, 2011" or "2011-Jan-01". For instance: :<code><nowiki>{{sortkey|January 1, 2011}}</nowiki></code> will return ''<nowiki><span style="display:none;"></nowiki>20110101<nowiki></span></nowiki>January 1, 2011''. ;Second unnamed parameter You can also use this template to create your own sortkey, not based on time, by using the second unnamed parameter by itself. This can be useful for getting text to sort how you want (such as sorting "The Goonies" by the letter "G"). Note that when using the second unnamed parameter, nothing is returned after the sortkey. :<code><nowiki>{{sortkey||Goonies, The}}</nowiki></code> will return ''<nowiki><span style="display:none;">Goonies, The</span></nowiki>''. ;No parameters If no parameters are used, the template returns an exclamation point, which will sort before most other characters. :<code><nowiki>{{sortkey}}</nowiki></code> will return ''<nowiki><span style="display:none;">!</span></nowiki>''.
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)