Template:Ability: Difference between revisions

From Inkipedia, the Splatoon wiki
m (Small fix to the template, so that it more simply handles non-number values for parameter 3)
(making into module invocation)
 
(10 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<includeonly>[[File:{{{1}}}_Ability_{{#ifeq:{{{2}}}|?|Locked|{{{2}}}}}.png|{{#iferror:{{#expr:{{{3|24}}}}}|24}}px|link={{#ifeq:{{{2}}}|?|Ability|{{{2}}}}}]]{{#ifeq:{{{2}}}|?||{{#ifeq:{{{3|}}}|icononly||{{#ifeq:{{{4|}}}|icononly||&#32;[[{{{2}}}]]}}}}}}</includeonly><noinclude>__NOTOC__
<includeonly>{{#invoke:Ability|main}}</includeonly><noinclude>
Displays an inline [[ability]] icon with a text link.
Template invocation of [[Module:Ability]].


== Parameters ==
{{:Module:Ability/doc}}
<code><nowiki>{{Ability|game|name|size|icononly}}</nowiki></code>
 
{| class="wikitable"
|- style="vertical-align: top;"
|<code>game</code>||Unnamed, required.||The game that the ability belongs to. Must be one of the following:
*<code>S</code> for Splatoon
*<code>S2</code> for Splatoon 2
|-
|<code>name</code>||Unnamed, required.||The English name of the ability. If <code>?</code>, the no-ability question mark will be used.
|-
|<code>size</code>||Unnamed, optional.||The pixel width for the icon. The default size is 24.
|-
|<code>icononly</code>||Unnamed, optional.||If present, the text label will be omitted.
|}
 
== Examples ==
=== Input ===
<nowiki>{{Ability|S|?}}<br />
{{Ability|S|Ink Saver (Main)}}<br />
{{Ability|S|Ink Saver (Main)|32}}<br />
{{Ability|S|Ink Saver (Main)|icononly}}<br />
{{Ability|S2|Ink Saver (Main)|32|icononly}}</nowiki>
 
=== Output ===
{{Ability|S|?}}<br />
{{Ability|S|Ink Saver (Main)}}<br />
{{Ability|S|Ink Saver (Main)|32}}<br />
{{Ability|S|Ink Saver (Main)|icononly}}<br />
{{Ability|S2|Ink Saver (Main)|32|icononly}}
 
[[Category:Templates]]
</noinclude>
</noinclude>

Latest revision as of 20:51, 7 September 2023

Template invocation of Module:Ability.

Displays an inline gear ability icon with a text link.

Usage

{{Ability|<game>|<name>|<size>|<icononly>}}

Parameters

Parameter Type Status Description
game Unnamed Required The game that the ability belongs to. Must be one of the following:
  • S for Splatoon
  • S2 for Splatoon 2
  • S3 for Splatoon 3
name Unnamed Required The English name of the ability.
  • ? can be used to get the no-ability question mark.
size Unnamed Optional The pixel width for the icon. The default size is 24. Required if icononly is specified.
icononly Unnamed Optional. If present, the text label will be omitted.

Examples

Markup

* {{Ability|S|?}}
* {{Ability|S|Ink Saver (Main)}}
* {{Ability|S|Ink Saver (Main)|32}}
* {{Ability|S2|Ink Saver (Main)|32|icononly}}
* {{Ability|S3|Ink Saver (Main)|32|icononly}}

Output