Template:Brand: Difference between revisions
From Inkipedia, the Splatoon wiki
GuyPerfect (talk | contribs) m (Converting non-breaking space to regular space) |
(The template now properly handles brands which are named the same as something else (amiibo, Nintendo, Sheldon's Picks, etc.) and ones that point to disambiguation pages (Custom, etc.). Also added a documentation note clarifying it works for weapon brands) |
||
Line 4: | Line 4: | ||
|#default = S | |#default = S | ||
}}_Brand_{{{1|SquidForce}}}.png|{{{2|24px}}}|{{{1|SquidForce}}}|link={{{1|SquidForce}}}]]{{#ifeq:{{{icononly|}}}|true|| | }}_Brand_{{{1|SquidForce}}}.png|{{{2|24px}}}|{{{1|SquidForce}}}|link={{{1|SquidForce}}}]]{{#ifeq:{{{icononly|}}}|true|| | ||
 [[{{{1}}}|{{{1}}}]] |  [[{{{1}}}{{#ifexist:{{{1}}}_(brand)|_(brand)}}|{{{1}}}]] | ||
}}</includeonly><noinclude>__NOTOC__ | }}</includeonly><noinclude>__NOTOC__ | ||
Displays an inline [[Brand]] icon with a text link. | Displays an inline [[Brand]] icon with a text link.<br />If a page named "<name>_(brand)" exists, the link will point to that page, but will still only show <name> as the text. | ||
=== Parameters === | === Parameters === | ||
{| | {| | ||
|- | |- | ||
|<code>name</code>||Unnamed.||The English name of the Brand. | |<code>name</code>||Unnamed.||The English name of the Brand. Can be either a [[Brand|gear brand]] or a [[weapon brand]]. | ||
|- | |- | ||
|<code>size</code>||Unnamed, optional.||A Mediawiki image size parameter for the icon. The default size is 24px. | |<code>size</code>||Unnamed, optional.||A Mediawiki image size parameter for the icon. The default size is 24px. | ||
Line 27: | Line 27: | ||
{{Brand|Krak-On|48px}}<br /> | {{Brand|Krak-On|48px}}<br /> | ||
{{Brand|Krak-On|game=Splatoon 2}}<br /> | {{Brand|Krak-On|game=Splatoon 2}}<br /> | ||
{{Brand|Krak-On|icononly=true}}</nowiki> | {{Brand|Krak-On|icononly=true}}<br /> | ||
{{Brand|amiibo}}<br /> | |||
{{Brand|Custom}}</nowiki> | |||
==== Output ==== | ==== Output ==== | ||
Line 33: | Line 35: | ||
{{Brand|Krak-On|48px}}<br /> | {{Brand|Krak-On|48px}}<br /> | ||
{{Brand|Krak-On|game=Splatoon 2}}<br /> | {{Brand|Krak-On|game=Splatoon 2}}<br /> | ||
{{Brand|Krak-On|icononly=true}} | {{Brand|Krak-On|icononly=true}}<br /> | ||
{{Brand|amiibo}}<br /> | |||
{{Brand|Custom}} | |||
</noinclude> | </noinclude> |
Revision as of 20:04, 8 February 2018
Displays an inline Brand icon with a text link.
If a page named "<name>_(brand)" exists, the link will point to that page, but will still only show <name> as the text.
Parameters
name |
Unnamed. | The English name of the Brand. Can be either a gear brand or a weapon brand. |
size |
Unnamed, optional. | A Mediawiki image size parameter for the icon. The default size is 24px. |
game |
Optional. | The game that the Brand belongs to. The default value is "Splatoon". Must be one of the following:
|
icononly |
Optional. | If present and "true", the text label will be omitted. |
Examples
Markup
{{Brand|Krak-On}}<br /> {{Brand|Krak-On|48px}}<br /> {{Brand|Krak-On|game=Splatoon 2}}<br /> {{Brand|Krak-On|icononly=true}}<br /> {{Brand|amiibo}}<br /> {{Brand|Custom}}