Difference between revisions of "Template:Rarity/doc"

From Yugipedia
Jump to: navigation, search
(create)
 
(See also: +)
(4 intermediate revisions by the same user not shown)
Line 5: Line 5:
 
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.
 
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 {{tlx|r|''rarity''}}, outputting the abbreviation for the given rarity. The full name can be outputted instead by using the <code><nowiki>{{{full}}}</nowiki></code> parameter, and the link can be omitted via <code><nowiki>{{{nolink}}}</nowiki></code>.
+
Basic usage is {{tlx|r|''rarity''}}, outputting the abbreviation for the given rarity. The full name can be output instead by using the <code><nowiki>{{{full}}}</nowiki></code> parameter.
  
 
==== Examples ====
 
==== Examples ====
Line 17: Line 17:
 
|-
 
|-
 
| {{tlx|r|Common|3=full=yes}} || {{r|Common|full=yes}} || {{tlx|r|C|3=full=yes}} || {{r|C|full=yes}}
 
| {{tlx|r|Common|3=full=yes}} || {{r|Common|full=yes}} || {{tlx|r|C|3=full=yes}} || {{r|C|full=yes}}
|-
 
| {{tlx|r|Common|3=nolink=yes}} || {{r|Common|nolink=yes}} || {{tlx|r|C|3=nolink=yes}} || {{r|C|nolink=yes}}
 
|-
 
| {{tlx|r|Common|3=full=yes|4=nolink=yes}} || {{r|Common|full=yes|nolink=yes}} || {{tlx|r|C|3=full=yes|4=nolink=yes}} || {{r|C|full=yes|nolink=yes}}
 
 
|-
 
|-
 
| {{tlx|r|Rare}} || {{r|Rare}} || {{tlx|r|R}} || {{r|R}}
 
| {{tlx|r|Rare}} || {{r|Rare}} || {{tlx|r|R}} || {{r|R}}
Line 27: Line 23:
 
|-
 
|-
 
| {{tlx|r|Foo}} || {{r|Foo}} || {{tlx|r|BLA}} || {{r|BLA}}
 
| {{tlx|r|Foo}} || {{r|Foo}} || {{tlx|r|BLA}} || {{r|BLA}}
 +
|-
 +
| <code>{{[[Template:R|r]]|}}</code> || {{r|}} || {{tlx|r}} || {{r}}
 
|-
 
|-
 
|}
 
|}
Line 32: Line 30:
 
=== See also ===
 
=== See also ===
 
* [[Rarity]]
 
* [[Rarity]]
* {{tl|Rarity}}
+
* {{tl|Rarities}}
 +
* {{tl|vg}}
  
 
<includeonly>
 
<includeonly>

Revision as of 21:42, 30 June 2014

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 {{r|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
{{r|Common}} [1] {{r|C}} [2]
{{r|common}} [3] {{r|c}} [4]
{{r|Common|full=yes}} [1] {{r|C|full=yes}} [2]
{{r|Rare}} [5] {{r|R}} [6]
{{r|Ghost Rare}} [7] {{r|GR}} [8]
{{r|Foo}} [9] {{r|BLA}} [10]
{{r|}} Cite error: Invalid <ref> tag; refs with no name must have content {{r}} Cite error: Invalid <ref> tag;

refs with no name must have content

See also

  1. a b Cite error: Invalid <ref> tag; no text was provided for refs named Common
  2. a b Cite error: Invalid <ref> tag; no text was provided for refs named C
  3. Cite error: Invalid <ref> tag; no text was provided for refs named common
  4. Cite error: Invalid <ref> tag; no text was provided for refs named c
  5. Cite error: Invalid <ref> tag; no text was provided for refs named Rare
  6. Cite error: Invalid <ref> tag; no text was provided for refs named R
  7. Cite error: Invalid <ref> tag; no text was provided for refs named Ghost Rare
  8. Cite error: Invalid <ref> tag; no text was provided for refs named GR
  9. Cite error: Invalid <ref> tag; no text was provided for refs named Foo
  10. Cite error: Invalid <ref> tag; no text was provided for refs named BLA