<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://moasspedia.org/w/index.php?action=history&amp;feed=atom&amp;title=Template%3ADEFAULTSORT%2Fdoc</id>
	<title>Template:DEFAULTSORT/doc - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://moasspedia.org/w/index.php?action=history&amp;feed=atom&amp;title=Template%3ADEFAULTSORT%2Fdoc"/>
	<link rel="alternate" type="text/html" href="https://moasspedia.org/w/index.php?title=Template:DEFAULTSORT/doc&amp;action=history"/>
	<updated>2026-04-04T13:57:56Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.37.2</generator>
	<entry>
		<id>https://moasspedia.org/w/index.php?title=Template:DEFAULTSORT/doc&amp;diff=13019&amp;oldid=prev</id>
		<title>Wikipedia&gt;Paul Erik: Reverted edits by 85.211.39.236 (talk) to last version by DB1729</title>
		<link rel="alternate" type="text/html" href="https://moasspedia.org/w/index.php?title=Template:DEFAULTSORT/doc&amp;diff=13019&amp;oldid=prev"/>
		<updated>2022-04-02T01:14:35Z</updated>

		<summary type="html">&lt;p&gt;Reverted edits by &lt;a href=&quot;/wiki/Special:Contributions/85.211.39.236&quot; title=&quot;Special:Contributions/85.211.39.236&quot;&gt;85.211.39.236&lt;/a&gt; (&lt;a href=&quot;/w/index.php?title=User_talk:85.211.39.236&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;User talk:85.211.39.236 (page does not exist)&quot;&gt;talk&lt;/a&gt;) to last version by DB1729&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;
&amp;lt;!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{important|Please use &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{DEFAULTSORT&amp;lt;/nowiki&amp;gt;{{highlight round|bc=lightgreen|&amp;#039;&amp;#039;&amp;#039;:&amp;#039;&amp;#039;&amp;#039;}}&amp;lt;nowiki&amp;gt;Sortkey}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;, rather than &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{DEFAULTSORT&amp;lt;/nowiki&amp;gt;{{highlight round|bc=lightsalmon|&amp;#039;&amp;#039;&amp;#039;&amp;amp;#124;&amp;#039;&amp;#039;&amp;#039;}}&amp;lt;nowiki&amp;gt;Sortkey}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;. {{nowrap|This uses the [[m:magic word|magic word]] directly instead of using the template to call the magic word.}}}}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;{{tlf|DEFAULTSORT:&amp;lt;sort key&amp;gt;}}&amp;#039;&amp;#039;&amp;#039; is a [[Help:Magic words|magic word]] used to modify the sequence of pages shown on [[Help:Category|category]] pages. The given sort key in a specific page is used to determine that page&amp;#039;s position in all category pages where the page is listed. &amp;#039;&amp;#039;Note&amp;#039;&amp;#039;: The specific page will still be listed with its original title, regardless of the modified sort order. The sort key can be overridden for specific categories, if their {{brackets|Category:}} tags contain a differing individual sort key.&lt;br /&gt;
&lt;br /&gt;
It is not necessary to use DEFAULTSORT at all if the article or page should be alphabetized according to its title (which is true for most articles).&lt;br /&gt;
&lt;br /&gt;
For background information on how the pages in a category are ordered, see {{section link|Help:Category|Default sort key}}.&lt;br /&gt;
&lt;br /&gt;
==Understanding DEFAULTSORT==&lt;br /&gt;
By default, pages listed on a category page are sorted by {{tlc|PAGENAME}}. It is possible to set a different sort key by using the {{tlc|DEFAULTSORT}} [[Help:magic words|magic word]].&lt;br /&gt;
&lt;br /&gt;
In the case of multiple default sort key tags, the last DEFAULTSORT on the final rendering of a page applies for all categories, regardless of the position of the category tags. This also means that a DEFAULTSORT tag included from a template is not effective if another DEFAULTSORT tag occurs later on the page, even if the later DEFAULTSORT tag is also &amp;quot;hidden&amp;quot; (included by another template).&lt;br /&gt;
&lt;br /&gt;
==Placement==&lt;br /&gt;
When using {{tl|DEFAULTSORT}} to modify the default sort key, the [[Help:magic words|magic word]] should be placed at the left margin of a new line, immediately above the line which begins the list of categories. For example, the last lines of a typical article titled &amp;#039;&amp;#039;&amp;#039;Forename Surname&amp;#039;&amp;#039;&amp;#039; could look like:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
==Final section==&lt;br /&gt;
Final line of content in &amp;quot;final section&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{{Templates}}&lt;br /&gt;
&lt;br /&gt;
{{Last metadata template&lt;br /&gt;
| LAST PARAMETER OF LAST METADATA TEMPLATE = Parameter content&lt;br /&gt;
}}&lt;br /&gt;
{{DEFAULTSORT:Surname, Forename}}&lt;br /&gt;
[[Category:Forename Surname| ]]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Tracking category==&lt;br /&gt;
* {{clc|Pages which use a template in place of a magic word}}&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* {{tl|DISPLAYTITLE}}&lt;br /&gt;
&lt;br /&gt;
== TemplateData ==&lt;br /&gt;
{{TemplateData header}}&lt;br /&gt;
&amp;lt;templatedata&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	&amp;quot;description&amp;quot;: &amp;quot;{{DEFAULTSORT:&amp;lt;sort key&amp;gt;}} is a magic word used to modify the sequence of pages shown on category pages. Please use {{DEFAULTSORT:Sortkey}} rather than {{DEFAULTSORT|Sortkey}}, with a colon (\&amp;quot;:\&amp;quot;), not a pipe symbol (\&amp;quot;|\&amp;quot;). This uses the magic word directly instead of using the template to call the magic word.&amp;quot;,&lt;br /&gt;
	&amp;quot;params&amp;quot;: {&lt;br /&gt;
		&amp;quot;1&amp;quot;: {}&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/templatedata&amp;gt;&amp;lt;includeonly&amp;gt;&lt;br /&gt;
{{transclusionless|reason=the magic word should always be used instead}}&amp;lt;!-- this is at the bottom to avoid this not-very-useful banner distracting people --&amp;gt;&lt;br /&gt;
{{Sandbox other||&lt;br /&gt;
&amp;lt;!-- Categories below this line, please; interwikis at Wikidata --&amp;gt;&lt;br /&gt;
[[Category:Sorting templates|DEFAULTSORT]]&lt;br /&gt;
[[Category:Wikipedia magic word templates]]&lt;br /&gt;
[[Category:Templates that add a tracking category]]&lt;br /&gt;
[[Category:Templates with no visible output]]&lt;br /&gt;
}}&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>Wikipedia&gt;Paul Erik</name></author>
	</entry>
</feed>