Template:NameSortTest: Difference between revisions
From Jenny Everywhere Wiki
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
<includeonly> | <includeonly> | ||
{{DEFAULTSORT:{{#switch:{{#rpos:{{PAGENAME}}|)}} | {{DEFAULTSORT: | ||
|-1= <!--if there are no close parentheses, then look for spaces--> {{#switch:{{#rpos:{{PAGENAME}}| }} | {{#switch:{{#rpos:{{PAGENAME}}|)}} | ||
|-1= <!--if there are no close parentheses, then look for spaces--> | |||
{{#switch:{{#rpos:{{PAGENAME}}| }} | |||
|-1 = {{PAGENAME}} <!--if there are no spaces, then just go by the PAGENAME--> | |-1 = {{PAGENAME}} <!--if there are no spaces, then just go by the PAGENAME--> | ||
|#default ={{#sub:{{PAGENAME}}|{{#rpos:{{PAGENAME}}| }}|7}}}}<!-- if there are spaces, then do something clever--> | |#default ={{#sub:{{PAGENAME}}|{{#rpos:{{PAGENAME}}| }}|7}}}}<!-- if there are | ||
spaces, then do something clever--> | |||
}} <!--first switch close--> | }} <!--first switch close--> | ||
|#default = {{#explode:{{#sub:{{PAGENAME}}|0|{{#expr:{{#rpos:{{PAGENAME}}|(}}-1}}}}| |-1}} | |#default = {{#explode:{{#sub:{{PAGENAME}}|0|{{#expr:{{#rpos:{{PAGENAME}}|(}}-1}}}}| |-1}} | ||
Line 17: | Line 19: | ||
* John Smith (actor) | * John Smith (actor) | ||
{{#explode:{{#sub:John Smith (actor)|0|{{#expr:{{#rpos:John Smith (actor)|(}}-1}}}}| |-1}} | {{#explode:{{#sub:John Smith (actor)|0|{{#expr:{{#rpos:John Smith (actor)|(}}-1}}}}| |-1}} | ||
{{#switch:{{#rpos:John Smith (actor)|)}} | |||
|-1= <!--if there are no close parentheses, then look for spaces--> | |||
{{#switch:{{#rpos:John Smith (actor)| }} | |||
|-1 = John Smith (actor) <!--if there are no spaces, then just go by the PAGENAME--> | |||
|#default ={{#sub:John Smith (actor)|{{#rpos:John Smith (actor)| }}|7}}}}<!-- if there are | |||
spaces, then do something clever--> | |||
}} <!--first switch close--> | |||
|#default = {{#explode:{{#sub:John Smith (actor)|0|{{#expr:{{#rpos:John Smith (actor)|(}}-1}}}}| |-1}} | |||
}} <!--second switch close--> | |||
</noinclude> | </noinclude> |
Revision as of 15:50, 1 February 2012
Template documentation
|
---|
Note: portions of the template sample may not be visible without values provided. |
View or edit this documentation. (About template documentation) |
Editors can experiment in this template's sandbox and test case pages. |
This is a testing ground for expanding the powers of {{NameSort}}. It is in no way complete. Please do not attempt to edit it.
- John Smith (actor)
Smith
|#default = Smith
}}