<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://stockhub.co/index.php?action=history&amp;feed=atom&amp;title=Module%3ASort_title%2Fdoc</id>
	<title>Module:Sort title/doc - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://stockhub.co/index.php?action=history&amp;feed=atom&amp;title=Module%3ASort_title%2Fdoc"/>
	<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:Sort_title/doc&amp;action=history"/>
	<updated>2026-05-24T05:33:01Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://stockhub.co/index.php?title=Module:Sort_title/doc&amp;diff=146849&amp;oldid=prev</id>
		<title>imported&gt;Gonnym at 10:29, 3 October 2020</title>
		<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:Sort_title/doc&amp;diff=146849&amp;oldid=prev"/>
		<updated>2020-10-03T10:29:16Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&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;
{{High-use}}&lt;br /&gt;
{{Lua|Module:Arguments|Module:String}}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Module:Sort title&amp;#039;&amp;#039;&amp;#039; is used to create [[WP:SORTKEY|sortkeys]] for pages.&lt;br /&gt;
&lt;br /&gt;
== What it does == &lt;br /&gt;
The module preforms the following checks:&lt;br /&gt;
* If the first word of the title is an [[Article (grammar)|article]], it moves it to the end of the title. For example: &amp;lt;code&amp;gt;The Avengers&amp;lt;/code&amp;gt; will have a sortkey of &amp;lt;code&amp;gt;Avengers, The&amp;lt;/code&amp;gt;.&lt;br /&gt;
* If the title is disambiguated and the first word of the disambiguation is an [[Article (grammar)|article]], it moves it to the end of the disambiguation. For example: &amp;lt;code&amp;gt;Pilot (The Flash)&amp;lt;/code&amp;gt; will have a sortkey of &amp;lt;code&amp;gt;Pilot (Flash, The)&amp;lt;/code&amp;gt;.&lt;br /&gt;
* If the title is disambiguated and the first word of the title and the disambiguation is an [[Article (grammar)|article]], both of the above changes will occur. For example: &amp;lt;code&amp;gt;The End (A Series of Unfortunate Events)&amp;lt;/code&amp;gt; will have a sortkey of &amp;lt;code&amp;gt;End, The (Series of Unfortunate Events, A)&amp;lt;/code&amp;gt;.&lt;br /&gt;
* If the title is a number which is separated by a commas, it removes the commas. For example: &amp;lt;code&amp;gt;4,722 Hours&amp;lt;/code&amp;gt; will have a sortkey of &amp;lt;code&amp;gt;4722 Hours&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
From template:&lt;br /&gt;
* {{Mlx|{{BASEPAGENAME}}|getSortKey}}&lt;br /&gt;
* {{Mlx|{{BASEPAGENAME}}|getDefaultSort}}&lt;br /&gt;
&lt;br /&gt;
From module:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;local sortkeyModule = require(&amp;#039;Module:Sort title&amp;#039;)&lt;br /&gt;
local sortkey = sortkeyModule._getSortKey()&lt;br /&gt;
&amp;lt;/source &amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Function list ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Function&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Explanation&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | &amp;lt;code&amp;gt;getSortKey&amp;lt;/code&amp;gt;&lt;br /&gt;
| Returns a sortkey&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | &amp;lt;code&amp;gt;getDefaultSort&amp;lt;/code&amp;gt;&lt;br /&gt;
| Returns a [[WP:DEFAULTSORT|DEFAULTSORT]] string&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;includeonly&amp;gt;{{#ifeq:{{SUBPAGENAME}}|sandbox | |&lt;br /&gt;
&amp;lt;!-- Categories below this line, please; interwikis at Wikidata --&amp;gt;&lt;br /&gt;
[[Category:Wikipedia modules]]&lt;br /&gt;
}}&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>imported&gt;Gonnym</name></author>
	</entry>
</feed>