Difference between revisions of "Template:Video game category header"

From Yugipedia
Jump to: navigation, search
(fix)
(Imported revision from memcached. (text_id:"4939389" ))
Line 2: Line 2:
 
}}{{ #vardefine: $type | {{ #explode: {{ #var: $pagename }} || -1 }}
 
}}{{ #vardefine: $type | {{ #explode: {{ #var: $pagename }} || -1 }}
 
}}{{ #switch: {{ #var: $type }}
 
}}{{ #switch: {{ #var: $type }}
   | artworks = {{ #vardefine: $type | Field Spell artworks }}
+
   | artworks = {{ #switch: {{ #explode: {{ #var: $pagename }} || -2 }}
   | cards | characters | icons | files | genres | sets | videos =  
+
    | Spell    = {{ #vardefine: $type | Field Spell artworks }}
 +
    | card    = {{ #vardefine: $type | card artworks }}
 +
    | #default = <!-- one-word type that shouldn't need adjusted -->
 +
  }}
 +
   | galleries = {{ #vardefine: $type | card galleries }}
 +
  | icons = {{ #switch: {{ #explode: {{ #var: $pagename }} || -2 }}
 +
    | Attribute = {{ #vardefine: $type | Attribute icons }}
 +
    | counter  = {{ #vardefine: $type | counter icons }}
 +
    | genre    = {{ #vardefine: $type | genre icons }}
 +
    | Type      = {{ #vardefine: $type | Type icons }}
 +
  }}
 
   | images = {{ #switch: {{ #explode: {{ #var: $pagename }} || -2 }}
 
   | images = {{ #switch: {{ #explode: {{ #var: $pagename }} || -2 }}
 
     | card      = {{ #vardefine: $type | card images }}
 
     | card      = {{ #vardefine: $type | card images }}
 
     | character = {{ #vardefine: $type | character images }}
 
     | character = {{ #vardefine: $type | character images }}
     | counter  = {{ #vardefine: $type | counter images }}
+
     | counter  = {{ #vardefine: $type | counter icons }}
 
     | list      = {{ #vardefine: $type | card list images }}
 
     | list      = {{ #vardefine: $type | card list images }}
 
     | monster  = {{ #vardefine: $type | monster images }}
 
     | monster  = {{ #vardefine: $type | monster images }}
 +
    | pack      = {{ #vardefine: $type | pack images }}
 
     | set      = {{ #vardefine: $type | set images }}
 
     | set      = {{ #vardefine: $type | set images }}
 
   }}
 
   }}
 +
  | Lists = {{ #vardefine: $type | Forbidden & Limited Lists }}
 
   | Puzzles = {{ #vardefine: $type | Duel Puzzles }}
 
   | Puzzles = {{ #vardefine: $type | Duel Puzzles }}
   | #default = {{ #vardefine: $type }}
+
  | cards | chapters | characters | events | files | genres | icons | items | locations | sets | videos = <!-- these are one-word types that don't need adjusting -->
 +
   | #default = {{ #vardefine: $type }}<!-- clear unrecognized types -->
 
}}{{ #vardefine: $game    | {{ #if: {{ #var: $type }} | {{ #explode: {{ #var: $pagename }} | {{ #var: $type }} }} | {{ #var: $pagename }} }}
 
}}{{ #vardefine: $game    | {{ #if: {{ #var: $type }} | {{ #explode: {{ #var: $pagename }} | {{ #var: $type }} }} | {{ #var: $pagename }} }}
}}{{ #vardefine: $vg-abbr  | {{vg|{{ #var: $game }}}}
+
}}{{ #vardefine: $vg       | {{vg|{{ #var: $game }}|full=1}}
}}{{ #vardefine: $vg       | {{vg|{{ #var: $vg-abbr }}|full=1}}
+
}}{{ #vardefine: $vg-abbr  | {{ #if: {{ #var: $vg }} | {{vg|{{ #var: $game }}}} }}
}}{{ #vardefine: $vg-link  | {{vg|{{ #var: $vg-abbr }}|full=1|link=1}}
+
}}{{ #vardefine: $vg-link  | {{ #if: {{ #var: $vg }} | {{vg|{{ #var: $game }}|full=1|link=1}} | {{ #var: $game }} }}
 +
}}{{ #vardefine: $vg      | {{ #var: $vg | {{ #var: $game }} }}<!-- if for some reason the game isn't listed in {{vg}}, we need *something* for the game's name -->
 
}}{{ #vardefine: $vg-short | {{ #switch: {{ #explode: {{ #var: $vg-link }} || 1 }}
 
}}{{ #vardefine: $vg-short | {{ #switch: {{ #explode: {{ #var: $vg-link }} || 1 }}
 
   | GX      = {{ #replace: {{ #var: $vg-link }} | Yu-Gi-Oh! GX }}
 
   | GX      = {{ #replace: {{ #var: $vg-link }} | Yu-Gi-Oh! GX }}
Line 23: Line 37:
 
   | ZEXAL    = {{ #replace: {{ #var: $vg-link }} | Yu-Gi-Oh! ZEXAL }}
 
   | ZEXAL    = {{ #replace: {{ #var: $vg-link }} | Yu-Gi-Oh! ZEXAL }}
 
   | ARC-V    = {{ #replace: {{ #var: $vg-link }} | Yu-Gi-Oh! ARC-V }}
 
   | ARC-V    = {{ #replace: {{ #var: $vg-link }} | Yu-Gi-Oh! ARC-V }}
  | The      = {{ #replace: {{ #var: $vg-link }} | Yu-Gi-Oh! The }}
 
 
   | #default = {{ #replace: {{ #var: $vg-link }} | Yu-Gi-Oh! }}
 
   | #default = {{ #replace: {{ #var: $vg-link }} | Yu-Gi-Oh! }}
 
   }}
 
   }}
 +
}}{{ #ifeq: {{ #explode: {{ #var: $vg-short }} }} | The
 +
  | {{ #vardefine: $vg-short | {{ #sub: {{ #var: $vg-short }} | 4 }} }}
 
}}<!--
 
}}<!--
  
Line 31: Line 46:
  
 
-->This category contains {{ #switch: {{ #var: $type }}
 
-->This category contains {{ #switch: {{ #var: $type }}
   | Field Spell artworks = [[Field Spell Card]] artworks from
+
  | artworks | card artworks = card artworks from
   | card images         = card images from
+
  | Attribute icons          = images of [[Attribute]] icons from
   | character images     = character images from
+
   | Field Spell artworks     = [[Field Spell Card]] artworks from
   | counter images       = [[counter]] images from
+
  | card galleries          = card galleries from
   | Duel Puzzles         = [[Duel Puzzle]]s from
+
   | card images             = card images from
   | files               = uploaded files for
+
  | chapters                = chapters from
   | icons               = uploaded icons for
+
   | character images         = character images from
   | images               = uploaded images for
+
   | counter icons            = images of [[counter]] icons from
   | monster images       = non-card monster images from
+
   | Duel Puzzles             = [[Duel Puzzle]]s from
   | set image           = set images from
+
  | events                  = events held in
   | videos               = uploaded videos for
+
   | files                   = uploaded files for
   | #default             = pages related to {{ #if: {{ #var: $type }} | {{ #var: $type }} in }}
+
  | Forbidden & Limited Lists = [[Forbidden]] & [[Limited]] lists from
 +
  | genre icons              = images of genre icons from
 +
   | icons                   = uploaded icons for
 +
   | images                   = uploaded images for
 +
   | monster images           = non-card monster images from
 +
  | pack images              = images of packs from
 +
   | set image               = set images from
 +
  | Type icons              = images of [[Type]] icons from
 +
   | videos                   = uploaded videos for
 +
   | #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:{{ #var: $pagename }}}} | R }} > 400 | {{CategoryTOC}}
 
{{ #ifexpr: {{ formatnum: {{PAGESINCATEGORY:{{ #var: $pagename }}}} | R }} > 400 | {{CategoryTOC}}
 
}}
 
}}
 
{{ #switch: {{ #var: $type }}
 
{{ #switch: {{ #var: $type }}
   | characters = {{ #ifexist: Template:{{ #var: $vg }} characters | {{ {{ #var: $vg }} characters }} | {{ #ifexist: Template:Characters/{{ #var: $vg-abbr }} | {{Characters/{{ #var: $vg-abbr }}}} }} }}
+
  | chapters  = {{ #ifexist: Template:{{ #var: $vg }} chapters | {{ {{ #var: $vg }} chapters|state=collapsed}} }}
   | sets = {{ #ifexist: Template:{{ #var: $vg }} sets | {{ {{ #var: $vg }} sets }} | {{ #ifexist: Template:Boosters/{{ #var: $vg-abbr }} | {{Boosters/{{ #var: $vg-abbr }}}} }} }}
+
   | characters = {{ #ifexist: Template:{{ #var: $vg }} characters | {{ {{ #var: $vg }} characters|state=collapsed}} | {{ #ifexist: Template:Characters/{{ #var: $vg-abbr }} | {{Characters/{{ #var: $vg-abbr }}|state=collapsed}} }} }}
 +
  | events    = {{ #ifexist: Template:{{ #var: $vg }} events | {{ {{ #var: $vg }} events|state=collapsed}} }}
 +
   | sets       = {{ #ifexist: Template:{{ #var: $vg }} sets | {{ {{ #var: $vg }} sets|state=collapsed}} | {{ #ifexist: Template:Boosters/{{ #var: $vg-abbr }} | {{Boosters/{{ #var: $vg-abbr }}|state=collapsed}} }} }}
 
}}
 
}}
 
<includeonly>{{ #if: {{ #var: $type }}
 
<includeonly>{{ #if: {{ #var: $type }}
   | [[Category:{{ #var: $vg-link }} {{ #if: {{ #pos: {{ #var: $type }} | images }}{{ #pos: {{ #var: $type }} | icons }}{{ #pos: {{ #var: $type }} | videos }}{{ #pos: {{ #var: $type }} | Field Spell artworks }} | files }}|{{ ucfirst: {{ #var: $type }} }}]]{{ #switch: {{ #var: $type }}
+
   | <!--
     | cards       = [[Category:{{ #if: {{ #var: $series }} | {{ #var: $series }} cards | Cards by video game }}|{{ #var: $vg-short }}]]
+
    # If any of the following types, put in "Category:<Video game> files"
     | card images  = [[Category:{{ #var: $series | Video game }} card images|{{ #var: $vg-short }}]]
+
    -->{{ #if: {{ #pos: {{ #var: $type }} | images }}{{ #ifeq: {{ #var: $type }} | icons | 1 }}{{ #pos: {{ #var: $type }} | videos }}{{ #pos: {{ #var: $type }} | artworks }}
     | characters  = [[Category:{{ #var: $series | Video game }} characters|{{ #var: $vg-short }}]]
+
    | [[Category:{{ #var: $vg-link }} files|{{ ucfirst: {{ #var: $type }} }}]]
     | Duel Puzzles = [[Category:Duel Puzzles|{{ #var: $vg-short }}]]
+
    | <!--
     | files       = [[Category:Files by video game|{{ #var: $vg-short }}]]
+
      # If a card gallery, put in "Category:<Video game> cards"
     | set images   = [[Category:Video game set images|{{ #var: $vg-short }}]]
+
      -->{{ #ifeq: {{ #var: $type }} | card galleries
     | sets         = [[Category:Video game sets|{{ #var: $vg-short }}]]
+
      | [[Category:{{ #var: $vg-link }} cards|{{ ucfirst: {{ #var: $type }} }}]]
 +
      | <!--
 +
        # If an icon type, put in "Category:<Video game> icons"
 +
        -->{{ #if: {{ #pos: {{ #var: $type }} | icons }}
 +
        | [[Category:{{ #var: $vg-link }} icons|{{ ucfirst: {{ #var: $type }} }}]]
 +
        | <!--
 +
          # Any other type goes straight into "Category:<Video game>"
 +
          -->[[Category:{{ #var: $vg-link }}|{{ ucfirst: {{ #var: $type }} }}]]
 +
      }}
 +
    }}
 +
  }}{{ #switch: {{ #var: $type }}
 +
    | Attribute icons  = [[Category:Video game Attribute icons|{{ #var: $vg-short }}]]
 +
    | card galleries  = [[Category:Video game card galleries by game|{{ #var: $vg-short }}]]
 +
    | card images      = [[Category:{{ #var: $series | Video game }} card images|{{ #var: $vg-short }}]]
 +
     | cards           = [[Category:{{ #if: {{ #var: $series }} | {{ #var: $series }} cards | Cards by video game }}|{{ #var: $vg-short }}]]
 +
     | chapters        = [[Category:Video game chapters|{{ #var: $vg-short }}]]
 +
    | characters      = [[Category:{{ #var: $series | Video game }} characters|{{ #var: $vg-short }}]]
 +
     | character images = [[Category:Images of video game characters|{{ #var: $vg-short }}]]
 +
    | counter icons    = [[Category:Counter icons|{{ #var: $vg-short }}]]
 +
     | Duel Puzzles     = [[Category:Duel Puzzles|{{ #var: $vg-short }}]]
 +
    | events          = [[Category:Video game events|{{ #var: $vg-short }}]]
 +
     | files           = [[Category:Files by video game|{{ #var: $vg-short }}]]
 +
    | Forbidden & Limited Lists = [[Category:Video game Forbidden & Limited Lists|{{ #var: $vg-short }}]]
 +
    | icons            = [[Category:Video game icons|{{ #var: $vg-short }}]]
 +
    | items            = [[Category:{{ #var: $series | Video game }} items|{{ #var: $vg-short }}]]
 +
    | locations        = [[Category:{{ #var: $series | Video game }} locations|{{ #var: $vg-short }}]]
 +
     | set images       = [[Category:Video game set images|{{ #var: $vg-short }}]]
 +
     | sets             = [[Category:Video game sets|{{ #var: $vg-short }}]]
 +
    | Type icons      = [[Category:Type icons|{{ #var: $vg-short }}]]
 
   }}
 
   }}
 
   | [[Category:Video games|{{ #var: $vg-short }}]]
 
   | [[Category:Video games|{{ #var: $vg-short }}]]
}}</includeonly><noinclude>[[Category:Templates]]</noinclude>
+
}}</includeonly><noinclude>[[Category:Templates]]{{Documentation}}</noinclude>

Revision as of 14:47, 8 April 2023

This category contains pages related to the video game [[|]].