Difference between revisions of "Template:AutoDEFAULTSORT"

From Disobiki
Jump to navigation Jump to search
Line 1: Line 1:
 
<includeonly>{{#ifeq: {{#rmatch:{{PAGENAME}}|^(A{{!}}The)\s|1}} | 1 |
 
<includeonly>{{#ifeq: {{#rmatch:{{PAGENAME}}|^(A{{!}}The)\s|1}} | 1 |
   {{DEFAULTSORT:{{#rreplace:{{PAGENAME}}|^(A{{!}}The)\s(.*?)$|$2, $1}}}}
+
   {{DEFAULTSORT:{{#rreplace:{{PAGENAME}}|^(A{{!}}The)\s|}}}}
 
| }}</includeonly><noinclude>
 
| }}</includeonly><noinclude>
 
==Usage==
 
==Usage==
  
Given "The Sinful Dwarf", return <code><nowiki>{{DEFAULTSORT:Sinful Dwarf, The}}</nowiki></code>. Handles "A Fistful of Dollars" too.
+
Given "The Sinful Dwarf", return <code><nowiki>{{DEFAULTSORT:Sinful Dwarf}}</nowiki></code>. Handles "A Fistful of Dollars" too.
  
 
<pre>
 
<pre>

Revision as of 10:56, 14 August 2010

Usage

Given "The Sinful Dwarf", return {{DEFAULTSORT:Sinful Dwarf}}. Handles "A Fistful of Dollars" too.

 {{AutoDEFAULTSORT}}