Difference between revisions of "Template:AutoDEFAULTSORT"
Jump to navigation
Jump to search
Morbus Iff (talk | contribs) |
Morbus Iff (talk | contribs) |
||
Line 1: | Line 1: | ||
− | <includeonly>{{#ifeq: {{#pos:{{PAGENAME}}|<nowiki | + | <includeonly>{{#ifeq: {{#pos:{{PAGENAME}}|A <nowiki />|}} | 0 | |
− | {{DEFAULTSORT:{{#replace:{{PAGENAME}}|<nowiki | + | {{DEFAULTSORT:{{#replace:{{PAGENAME}}|A <nowiki />|}}, A}} |
| }} | | }} | ||
− | {{#ifeq: {{#pos:{{PAGENAME}}|<nowiki | + | {{#ifeq: {{#pos:{{PAGENAME}}|The <nowiki />}} | 0 | |
− | {{DEFAULTSORT:{{#replace:{{PAGENAME}}|<nowiki | + | {{DEFAULTSORT:{{#replace:{{PAGENAME}}|The <nowiki />|}}, The}} |
| }}</includeonly><noinclude> | | }}</includeonly><noinclude> | ||
==Usage== | ==Usage== |
Revision as of 09:37, 14 August 2010
Usage
Given "The Sinful Dwarf", return {{DEFAULTSORT:Sinful Dwarf, The}}
. Handles "A Fistful of Dollars" too.
It's not perfect: if "The" or "A" (capitalized) appear elsewhere in title, it'll remove those from the DEFAULTSORT result.
{{AutoDEFAULTSORT}}