Template:Gear: Difference between revisions
From Inkipedia, the Splatoon wiki
(Allowed icononly to be used even if size is not specified.) |
m (Updated documentation to reflect the previous change and fixed a small bug with it.) |
||
Line 1: | Line 1: | ||
<includeonly>[[File:{{{1}}}_Gear_{{{2}}}_{{{3}}}.png|{{{4|24}}}px|link={{{3}}}]]{{#ifeq:{{{4}}}|icononly||{{#ifeq:{{{5}}}|icononly|| [[{{{3}}}]]}}}}</includeonly><noinclude> | <includeonly>[[File:{{{1}}}_Gear_{{{2}}}_{{{3}}}.png|{{#iferror:{{#expr:{{{4|24}}}}}|24}}px|link={{{3}}}]]{{#ifeq:{{{4}}}|icononly||{{#ifeq:{{{5}}}|icononly|| [[{{{3}}}]]}}}}</includeonly><noinclude> | ||
Displays an inline [[gear]] item icon with a text link. | Displays an inline [[gear]] item icon with a text link. | ||
Line 29: | Line 29: | ||
{{Gear|S|Clothing|Basic Tee|64|icononly}} | {{Gear|S|Clothing|Basic Tee|64|icononly}} | ||
{{Gear|S|Clothing|Basic Tee|icononly}} | |||
{{Gear|S2|Clothing|Basic Tee|64|icononly}}</pre> | {{Gear|S2|Clothing|Basic Tee|64|icononly}}</pre> | ||
=== Output === | === Output === | ||
{{Gear|S|Clothing|Basic Tee}} | |||
{{Gear|S|Clothing|Basic Tee|64}} | |||
{{Gear|S|Clothing|Basic Tee|64|icononly}} | |||
{{Gear|S|Clothing|Basic Tee|icononly}} | |||
{{Gear|S2|Clothing|Basic Tee|64|icononly}} | |||
[[Category:Templates]] | [[Category:Templates]] | ||
</noinclude> | </noinclude> |
Revision as of 13:48, 13 February 2018
Displays an inline gear item icon with a text link.
Parameters
{{Gear|game|category|name|size|icononly}}
game |
Unnamed, required. | The game that the item belongs to. Must be one of the following:
|
category |
Unnamed, required. | The type of gear. Must be one of the following:
|
name |
Unnamed, required. | The English name of the item. |
size |
Unnamed, optional. | The pixel width for the icon. The default size is 24px. |
icononly |
Unnamed, optional. | If present, the text label will be omitted. |
Examples
Input
{{Gear|S|Clothing|Basic Tee}} {{Gear|S|Clothing|Basic Tee|64}} {{Gear|S|Clothing|Basic Tee|64|icononly}} {{Gear|S|Clothing|Basic Tee|icononly}} {{Gear|S2|Clothing|Basic Tee|64|icononly}}