Difference between revisions of "Template:Rarity"
m (The comment was interfering with substitution) |
m (So that the comment isn't returned for a null input) |
||
Line 52: | Line 52: | ||
| dupr | duel terminal ultra parallel = {{ {{{|safesubst:}}}#if: {{{full|}}} | Duel Terminal Ultra Parallel Rare | DUPR }} | | dupr | duel terminal ultra parallel = {{ {{{|safesubst:}}}#if: {{{full|}}} | Duel Terminal Ultra Parallel Rare | DUPR }} | ||
| dscpr | duel terminal secret parallel = {{ {{{|safesubst:}}}#if: {{{full|}}} | Duel Terminal Secret Parallel Rare | DScPR }} | | dscpr | duel terminal secret parallel = {{ {{{|safesubst:}}}#if: {{{full|}}} | Duel Terminal Secret Parallel Rare | DScPR }} | ||
− | | <!-- blank --> | #default = <!-- return blank by default --> | + | | <!-- blank --> | #default = <noinclude><!-- return blank by default --></noinclude> |
}}<noinclude>{{Documentation}}</noinclude> | }}<noinclude>{{Documentation}}</noinclude> |
Revision as of 02:00, 12 September 2016
Usage
This template is used to standardize rarity names/abbreviations for templates, so they don't have to implement such a check locally. It currently supports all official rarities and their abbreviations, and is not case-sensitive. The template doesn't return anything when fed unsupported values, which can be used for error-checking.
Basic usage is {{rarity|rarity}}
, outputting the abbreviation for the given rarity. The full name can be output instead by using the {{{full}}}
parameter.
Examples
Code | Result | Code | Result |
---|---|---|---|
{{rarity|Common}} |
C | {{rarity|C}} |
C |
{{rarity|common}} |
C | {{rarity|c}} |
C |
{{rarity|Common|full=yes}} |
Common | {{rarity|C|full=yes}} |
Common |
{{rarity|Rare}} |
R | {{rarity|R}} |
R |
{{rarity|Ghost Rare}} |
GR | {{rarity|GR}} |
GR |
{{rarity|Foo}} |
{{rarity|BLA}} |
||
{{rarity|}} |
{{rarity}} |