Difference between revisions of "Template:Video game category header"
Dinoguy1000 (talk | contribs) ({{formatnum:|R}} to strip separators (breaking the #ifexpr)) |
Dinoguy1000 (talk | contribs) (add support for Duel Puzzle categories; display character navbox on character categories) |
||
Line 8: | Line 8: | ||
| monster = {{ #vardefine: $type | monster images }}{{ #vardefine: $game | {{ #explode: {{PAGENAME}} | {{ #var: $type }} }} }} | | monster = {{ #vardefine: $type | monster images }}{{ #vardefine: $game | {{ #explode: {{PAGENAME}} | {{ #var: $type }} }} }} | ||
}} | }} | ||
+ | | Puzzles = {{ #vardefine: $type | Duel Puzzles }}{{ #vardefine: $game | {{ #explode: {{PAGENAME}} | {{ #var: $type }} }} }} | ||
| #default = {{ #vardefine: $game | {{PAGENAME}} }}{{ #vardefine: $type }} | | #default = {{ #vardefine: $game | {{PAGENAME}} }}{{ #vardefine: $type }} | ||
}}{{ #vardefine: $vg-abbr | {{vg|{{ #var: $game }}}} | }}{{ #vardefine: $vg-abbr | {{vg|{{ #var: $game }}}} | ||
Line 20: | Line 21: | ||
}} | }} | ||
}}This category contains {{ #switch: {{ #var: $type }} | }}This category contains {{ #switch: {{ #var: $type }} | ||
− | | files = uploaded files for | + | | files = uploaded files for |
− | | card images = card images from | + | | card images = card images from |
| character images = character images from | | character images = character images from | ||
− | | monster images = non-card images from | + | | Duel Puzzles = [[Duel Puzzle]]s from |
− | | #default = pages related to {{ #if: {{ #var: $type }} | {{ #var: $type }} in }} | + | | monster images = non-card images from |
+ | | #default = pages related to {{ #if: {{ #var: $type }} | {{ #var: $type }} in }} | ||
}} the video game ''[[{{ #var: $vg-link }}|{{ #var: $vg }}]]''. | }} the video game ''[[{{ #var: $vg-link }}|{{ #var: $vg }}]]''. | ||
− | + | {{ #ifexpr: {{ formatnum: {{PAGESINCATEGORY:{{PAGENAME}}}} | R }} > 400 | {{Contents}} | |
− | {{ #ifexpr: {{ formatnum: {{PAGESINCATEGORY:{{PAGENAME}}}} | R }} > 400 | {{Contents}} }} | + | }} |
− | + | {{ #switch: {{ #var: $type }} | |
− | {{ # | + | | characters = {{ #ifexist: Template:{{ #var: $vg }} characters | {{ {{ #var: $vg }} characters }} | {{ #ifexist: Template:Characters/{{ #var: $vg-abbr }} | {{Characters/{{ #var: $vg-abbr }}}} }} }} |
− | | {{ #ifexist: Template:{{ #var: $vg }} sets | {{ {{ #var: $vg }} sets }} | {{ #ifexist: Template:Boosters/{{ #var: $vg-abbr }} | {{Boosters/{{ #var: $vg-abbr }}}} }} }} | + | | sets = {{ #ifexist: Template:{{ #var: $vg }} sets | {{ {{ #var: $vg }} sets }} | {{ #ifexist: Template:Boosters/{{ #var: $vg-abbr }} | {{Boosters/{{ #var: $vg-abbr }}}} }} }} |
}} | }} | ||
<includeonly>{{ #if: {{ #var: $type }} | <includeonly>{{ #if: {{ #var: $type }} | ||
| [[Category:{{ #var: $vg }} {{ #if: {{ #pos: {{ #var: $type }} | images }} | files }}|{{ ucfirst: {{ #var: $type }} }}]]{{ #switch: {{ #var: $type }} | | [[Category:{{ #var: $vg }} {{ #if: {{ #pos: {{ #var: $type }} | images }} | files }}|{{ ucfirst: {{ #var: $type }} }}]]{{ #switch: {{ #var: $type }} | ||
− | | cards | + | | cards = [[Category:Cards by video game|{{ #var: $vg-short }}]] |
− | | card images = [[Category:Video game card images|{{ #var: $vg-short }}]] | + | | card images = [[Category:Video game card images|{{ #var: $vg-short }}]] |
− | | characters | + | | characters = [[Category:Video game characters|{{ #var: $vg-short }}]] |
− | | files | + | | Duel Puzzles = [[Category:Duel Puzzles|{{ #var: $vg-short }}]] |
− | | sets | + | | files = [[Category:Files by video game|{{ #var: $vg-short }}]] |
+ | | sets = [[Category:Video game sets|{{ #var: $vg-short }}]] | ||
}} | }} | ||
| [[Category:Video games|{{ #var: $vg-short }}]] | | [[Category:Video games|{{ #var: $vg-short }}]] | ||
}}</includeonly><noinclude>[[Category:Templates]]</noinclude> | }}</includeonly><noinclude>[[Category:Templates]]</noinclude> |
Revision as of 14:16, 24 October 2019
This category contains pages related to the video game [[|]].