Difference between revisions of "User:Becasita/SubPages/Templates/Card/Sortkey"
< User:Becasita | SubPages | Templates | Card
(Creating. This is used to define a sortkey for OCG/TCG cards.) |
(Simpler and more correct.) |
||
Line 13: | Line 13: | ||
# Check for "A"/"An"/"The": | # Check for "A"/"An"/"The": | ||
− | -->{{ # | + | -->{{ #switch: {{ #var: $Input-0 }} |
− | + | | A | An | |
− | + | | The = {{ #if: {{ #pos: {{ #var: $Input }} | The Agent }}<!-- | |
− | + | -->{{ #pos: {{ #var: $Input }} | The Fabled }} | |
− | + | | <!-- Nothing for "The Agent" and "The Fabled". --> | |
− | + | | {{ #vardefine: $Sortkey | |
− | + | | {{ #sub: {{ #var: $Input }} | {{ #len: {{ #var: $Input-0 }} }} }} | |
− | + | }} | |
− | + | }} | |
− | |||
}}<!-- | }}<!-- | ||
Line 48: | Line 47: | ||
# Else: | # Else: | ||
− | -->{{ # | + | -->{{ #vardefine: $Sortkey |
− | + | | {{ #var: $Sortkey | |
− | | {{ # | + | | {{ #var: $Input }} |
+ | }} | ||
}}<!-- | }}<!-- | ||
Latest revision as of 22:56, 3 April 2017
- $Input-0:
- $Input-1:
- $Input-S1:
- $Input-Number:
- $Input-Number-Name:
- Sortkey: