Difference between revisions of "Template:AutoDEFAULTSORT"
Jump to navigation
Jump to search
Morbus Iff (talk | contribs) |
Morbus Iff (talk | contribs) |
||
Line 2: | Line 2: | ||
{{DEFAULTSORT:{{#if: {{{namespace|}}} | {{NAMESPACE}}: }}{{#rreplace:{{PAGENAME}}|^(A{{!}}The)\s|}}}} | {{DEFAULTSORT:{{#if: {{{namespace|}}} | {{NAMESPACE}}: }}{{#rreplace:{{PAGENAME}}|^(A{{!}}The)\s|}}}} | ||
(({{#if: {{{namespace|}}} | {{NAMESPACE}}: }}{{#rreplace:{{PAGENAME}}|^(A{{!}}The)\s|}})) | (({{#if: {{{namespace|}}} | {{NAMESPACE}}: }}{{#rreplace:{{PAGENAME}}|^(A{{!}}The)\s|}})) | ||
− | (( | + | (({{#rreplace:{{PAGENAME}}|The|}})) |
| }}</includeonly><noinclude> | | }}</includeonly><noinclude> | ||
==Usage== | ==Usage== |
Revision as of 09:02, 18 February 2012
Usage
Given "The Sinful Dwarf", return {{DEFAULTSORT:Sinful Dwarf}}
. Handles "A Fistful of Dollars" too.
If namespace=1
is passed, include the namespace (necessary for proper sorting of File: uploads, for example).
{{AutoDEFAULTSORT}} {{AutoDEFAULTSORT|namespace=1}}