Difference between revisions of "Template:Set navigation"
Dinoguy1000 (talk | contribs) (fix for AC19) |
(Add {{{set}}}, for sets with weirder names, instead of having a bunch of exceptions.) |
||
Line 1: | Line 1: | ||
{{ #vardefine: $set-url-name | {{ #if: {{{1|}}} | {{{1}}} | {{Normalized pagename|{{PAGENAME}}}} }} | {{ #vardefine: $set-url-name | {{ #if: {{{1|}}} | {{{1}}} | {{Normalized pagename|{{PAGENAME}}}} }} | ||
}}{{ #vardefine: $list-url-name | }}{{ #vardefine: $list-url-name | ||
− | | {{ #if: {{ #pos: {{ #var: $set-url-name }} | (2011) }}<!-- | + | | {{ #if: {{{set|}}} |
− | + | | {{{set}}} | |
− | + | | {{ #if: {{ #pos: {{ #var: $set-url-name }} | (2011) }}<!-- TODO: clean these later. | |
− | + | OR -->{{ #pos: {{ #var: $set-url-name }} | (2018) }}<!-- | |
− | + | OR -->{{ #pos: {{ #var: $set-url-name }} | (2019) }}<!-- | |
− | + | OR -->{{ #pos: {{ #var: $set-url-name }} | (series) }} | |
+ | | {{ #var: $set-url-name }} | ||
+ | | {{ #explode: {{ #var: $set-url-name }} | ( }} | ||
+ | }} | ||
}} | }} | ||
}}{{ #vardefine: $name | {{ #if: {{{2|}}} | {{{2}}} | {{ #explode: {{ #var: $list-url-name }} | ( }} }} | }}{{ #vardefine: $name | {{ #if: {{{2|}}} | {{{2}}} | {{ #explode: {{ #var: $list-url-name }} | ( }} }} |
Revision as of 11:43, 22 October 2019
{{Set navigation}} is used to create navigational boxes for set pages.
Usage
{{Set navigation | lists = | 1e_galleries = | ue_galleries = | le_galleries = | strategy = }}
All parameters are optional.
- lists: A comma separated list of the region ids used in the page names of the associated list pages.
- 1e_galleries: A comma separated list of the region ids used in the page names of the associated 1st Edition gallery pages.
- ue_galleries: A comma separated list of the region ids used in the page names of the associated Unlimited Edition gallery pages.
- le_galleries: A comma separated list of the region ids used in the page names of the associated Limited Edition gallery pages.
- strategy: A comma separated list of the region names or IDs used in the page names of the associated Strategy Card gallery pages.
The name of the set is linked at the top of the box and in the links to related pages. There are a number of ways of determining what this set should be:
- By default the name of the set is taken from the page name, excluding the namespace. If the page name contains brackets, only the text up to and not including the first bracket is used. e.g. for Set Card Lists:Legend of Blue Eyes White Dragon (TCG-EN), it would get "Legend of Blue Eyes White Dragon".
- If the previous method does not return the set's page name, an unnamed parameter can be used. e.g.
{{Set navigation|Legend of Blue Eyes White Dragon|...}}
. If this is done, the unnamed parameter's value is used for the link and, if the parameter value contains brackets, only the text up to and not including the first bracket is used. - If the set name cannot be automatically determined from its page name, a second unnamed parameter can be used to enter the set's name. e.g.
{{Set navigation|Reprint 1 (set)|Reprint #1|...}}
or{{Set navigation||Reprint #1|...}}
Examples
{{Set navigation | lists = EN,NA,EU,FR,DE,IT,SP,AE,KR | 1e_galleries = NA,EU,FR,DE,IT,SP,AE,KR | ue_galleries = EN,NA,EU,FR,DE,IT,SP,KR }}
{{Set navigation|Legend of Blue Eyes White Dragon | lists = EN,NA,EU,FR,DE,IT,SP,AE,KR | 1e_galleries = NA,EU,FR,DE,IT,SP,AE,KR | ue_galleries = EN,NA,EU,FR,DE,IT,SP,KR }}
{{Set navigation|Structure Deck: Marik (TCG)|Structure Deck: Marik | 1e_galleries = EN,FR,DE,IT,SP }}
See also
- {{Navigation}}
- {{Navbox}}
- {{Set list tabs}}
- {{Set list transclusion}}