Template:Set gallery
This template uses Lua: |
This template is used to generate set galleries.
Usage
{{Set gallery|abbr=|rarity=|alt=|notes=|description=|$description=| <card number>; <card name>; <card rarity>; <alt> // <entry options> }}
Each template call builds one gallery only. For multiple galleries on the same page, multiple calls to the template must be made.
Ideally, for this case, each separate gallery should have its own MediaWiki header.
For the page header, {{Set page header}} must be used.
Parameters
All parameters are optional except where noted.
abbr
- Used to pass a set abbreviation code. If this parameter is used, the first value of the entry will be interpreted as the card name, instead of as the card number (card numbers won't be displayed). It's overwritten by locally passing an abbreviation (card numbers still won't be displayed), through the entry option
abbr
.
rarity
- Used to pass the rarity of the card. Defaults to Common.
alt
- Used to pass an alt code for the file path. This code would apply to all the entries, unless a specific code is passed for the individual entry.
notes
- Text to be prepended to the gallery.
description
- Appends a description to the English card name. The value passed will be used as a default value.
$description
- Sets a template description.
Building an entry
Each entry goes in one line.
Entries are in the form of <card number>; <card name>; <card rarity>; <alt> // <entry options>
.
card number
- The card number. For cards that don't have a card number, it should be left blank (but still separated from the card name). If the global option
noabbr
is used, the card number is omitted and the first value will be considered as the card name, the second the card rarities and so on.
card name
- The card English name or the pagename. Supports
#
in the card name. If the card English name uses less common characters, it's advised to input the pagename here and use the entry optionforce-SMW
.
card rarity
- The card rarity. If left empty, the default rarity defined in parameter
rarities
will be used.
alt
- Alt code for the file path.
Entry options
The options part is optional and is separated by inserting //
and then the options pairs. Each option is a pair separated by ;
and consists of an option name and the respective value, separated by `::`. Available options are:
abbr::<value>
- Sets a set abbreviation for this entry. Used when a single entry doesn't have a card number. If used, the first value of the entry will be interpreted as the card name, instead of as the card number (card numbers won't be displayed).
printed-name::<old name>
- Used for when the card was released in that set with a name different the current name. This appends the old name to the localized name this gallery presents, so this should be used only if the name of the card in that language was different at the time of release than it is now.
description::<value>
- Adds a description next to the English name. If this is not used but the
description
parameter is used, it will display the defaultdescription
. If a value is present, it will display that value (regardless of the defaultdescription
). The only exception is if$description
was used; the value passed here will be interpolated to the template value defined by$description
.
force-SMW
- This option enables extra fetching from SMW properties. This option is to be used when there is a need to get the card English name from the pagename (provided as input) and to generate the correct file name.
file::<value>
- Overrides the file path with whatever value is entered here. Should be avoided as much as possible.
Examples
- Set Card Galleries:Duelist Pack: Jaden Yuki 2 (TCG-FR-1E) (Use of the
printed-name
entry option.) - Set Card Galleries:Booster 3 (OCG-JP) (Use of the
abbr
parameter.) - Set Card Galleries:777 Treasure Campaign (OCG-JP) (Use of
force-SMW
entry option.) - Set Card Galleries:Hobby League participation cards (TCG-EN-UE) (Multiple galleries.)
- Set Card Galleries:Sneak Peek Participation Cards: Series 6 (TCG-EN-LE) (Use of
description
.)
Tracking categories
- Category:((Set gallery)) transclusions to be checked: General category that contains all pages using {{Set gallery}} with errors. Each page present in the following categories is also present on this one.
- Category:((Set gallery)) transclusions with invalid parameters: There are parameters in use that are not part of this template.
- Category:((Set gallery)) transclusions with missing required parameters: There are template parameters that are required but were not entered.
- Category:((Set gallery)) transclusions with empty parameters: There are template parameters in use that are not receiving any value, but should always receive a non-empty value when used.
- Category:((Set gallery)) transclusions with empty options: There is a place that receives input in the options format but received empty options.
- Category:((Set gallery)) transclusions with invalid rarities: A rarity provided for the default rarity or for an entry is not valid.
- Category:((Set gallery)) transclusions with missing card number: A card number that should exist is missing.
- Category:((Set gallery)) transclusions with missing card name: There is an entry without a card name.
- Category:((Set gallery)) transclusions with empty printed-name: The entry option
printed-name
is used but it's empty. - Category:((Set gallery)) transclusions with empty extension: An empty extension was provided.
Each page tagged with each of these tracking categories presents details about the errors.