<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://safernicotine.wiki/mediawiki/index.php?action=history&amp;feed=atom&amp;title=Template%3ASort%2Fdoc</id>
	<title>Template:Sort/doc - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://safernicotine.wiki/mediawiki/index.php?action=history&amp;feed=atom&amp;title=Template%3ASort%2Fdoc"/>
	<link rel="alternate" type="text/html" href="https://safernicotine.wiki/mediawiki/index.php?title=Template:Sort/doc&amp;action=history"/>
	<updated>2026-04-16T17:28:21Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>https://safernicotine.wiki/mediawiki/index.php?title=Template:Sort/doc&amp;diff=40665&amp;oldid=prev</id>
		<title>imported&gt;Olivaw-Daneel: redorder hatnotes (user-notice above edit-notice)</title>
		<link rel="alternate" type="text/html" href="https://safernicotine.wiki/mediawiki/index.php?title=Template:Sort/doc&amp;diff=40665&amp;oldid=prev"/>
		<updated>2022-08-05T02:56:13Z</updated>

		<summary type="html">&lt;p&gt;redorder hatnotes (user-notice above edit-notice)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{documentation subpage}}&lt;br /&gt;
{{Ombox|type=content|text=This template should be avoided. Table sort keys are best defined using the &amp;lt;code&amp;gt;data-sort-value&amp;lt;/code&amp;gt; attribute, like so: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;| data-sort-value=&amp;quot;Doe, John&amp;quot; | John Doe&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;. Please see {{Section link|WP:SORT|Specifying a sort key for a cell}} for details.}}&lt;br /&gt;
{{#ifeq:{{SUBPAGENAME}}|sandbox||{{High-use}}}}&lt;br /&gt;
{{Lua|Module:Sortkey}}&lt;br /&gt;
&lt;br /&gt;
This template is for manually adjusting sorting order in sortable tables by specified sortkeys.&lt;br /&gt;
&lt;br /&gt;
; Usage:&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{&amp;lt;/nowiki&amp;gt;Sort | 1 = {{{sort value}}} | 2 = {{{displayed value}}} }}&amp;lt;/code&amp;gt; → {{sort | 1 = {{{sort value}}} | 2 = {{{displayed value}}} }}&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{&amp;lt;/nowiki&amp;gt;Sort | 1 = {{{displayed value}}} }}&amp;lt;/code&amp;gt; → {{sort | 1 = {{{displayed value}}} }}&lt;br /&gt;
A table using this template should use it in all rows.&lt;br /&gt;
&lt;br /&gt;
This template works by adding a hidden sort value, which replaces the value of the visible text for sorting purposes. The HTML output looks like: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;span data-sort-value=&amp;quot;sortvalue&amp;quot;&amp;gt;[[displayed value]]&amp;lt;/span&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=====Example=====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
|{{Sort|Brothers Karamazov|[[The Brothers Karamazov]]}}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;Sorting by numerical value, date, etc.&lt;br /&gt;
:See [[Help:Sorting#Numerical sorting problems]] and [[meta:Help:Sorting#Sort modes]]&lt;br /&gt;
&lt;br /&gt;
;Equal rank&lt;br /&gt;
:If you simply code as the second parameter an indicator that two items are equally ranked, e.g. &amp;quot;4=&amp;quot;, the template interpreter will treat this as an additional parameter (i.e. parameter 4, which it will then not use). You must explicitly code this as parameter 2:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;{{Sort|4|2=4=}}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* {{tiw|Sortname}}—for using names in sortable tables (using &amp;quot;last name, first name&amp;quot; as default sort key)&lt;br /&gt;
* {{tiw|Date table sorting}}—for using dates in sortable tables&lt;br /&gt;
* {{tiw|Number table sorting}}—for using alphabetic sort mode for numbers in sortable tables&lt;br /&gt;
* [[Help:Sorting]]&lt;br /&gt;
* [[meta:Help:Sorting]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;includeonly&amp;gt;{{Sandbox other||&lt;br /&gt;
[[Category:Sorting templates|{{PAGENAME}}]]&lt;br /&gt;
}}&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>imported&gt;Olivaw-Daneel</name></author>
	</entry>
</feed>