Overwatch Wiki
(Added link to ability)
No edit summary
(11 intermediate revisions by 3 users not shown)
Line 1: Line 1:
  +
<noinclude>
<includeonly>{{#vardefine:icon|
 
  +
{{cleanup|[[Template:Ability details]] is not saving abilities on some pages, causing this template the break.}}
{{#cargo_query:
 
  +
</noinclude>
table=Abilities
 
  +
|fields=ability_image
 
 
<includeonly>{{#vardefine:name|{{{name|{{{1|}}} }}} }}<!--
|default=None
 
  +
-->{{#vardefine:link|{{show|A|{{#var:name}}|_pageName}}#{{#var:name}} }}<!--
|more results text=
 
  +
-->{{#vardefine:imageOpts|{{{size|{{{3|22px}}} }}} }}<!--
|limit = 1
 
  +
-->{{#vardefine:text|{{{text|{{{2|}}} }}} }}<!--
|where=ability_name="{{{1}}} "
 
 
-->[[File:{{show|A|{{#var:name}}|ability_image}}|middle|link={{#var:link}}|{{#var:imageOpts}}]]{{Space}}{{#if:{{{icononly|}}}||[[{{#var:link}}{{!}}{{#if:{{#var:text}}|{{#var:text}}|{{#var:name}} }}]] }}</includeonly><noinclude>
|no html}}
 
}}
 
{{#ifeq: {{#var: icon}} | None |
 
|[[File:{{#var:icon}}|middle|link=|{{{3|30px}}}]]{{Space}}}}'''[[{{{1}}}{{#if:{{{2|}}} |{{!}}{{{2}}} }}]]'''</includeonly><noinclude>
 
 
{{Doc}}
 
{{Doc}}
 
[[Category:Templates]]
 
[[Category:Templates]]

Revision as of 19:53, 24 October 2020

Cleanup This article needs cleanup to meet quality standards.
Please help improve this page if you can. The talk page may contain suggestions.

Reason: "Template:Ability details is not saving abilities on some pages, causing this template the break."




Template-info Documentation

Alias:{{Al}}

Usage & parameters

Adds an inline link to a hero ability with optional ability icon.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Ability Namename 1

The exact name of the hero ability to show an icon for.

Example
EMP, Earthshatter, The Viper
Stringrequired
Display texttext 2

Text to be displayed instead of displaying the ability name

Stringoptional
Icon sizesize 3

Size to display ability icon

Default
30px
Example
15px
Stringoptional
Icon onlyicononly

Setting this to any value will return just the icon

Unknownoptional

Dependencies

Uses template {{show}} to fetch ability details from cargo.

Examples

Reins

Ability-reinhardt5 Earthshatter hits everyone in front of it.

Ability-ashe1 The Viper is one of the only semi-auto weapons in the game.

You can override the display text for

Ability Sombra EMP EMP using {{{2}}} like this

Ability Sombra EMP This text is shown instead

{{{3}}} is passed directly to [[File]]. Most often used to override the image size.


Ability-ashe2


Ability-ana2 Display text


Ability-ana2 Sleep Dart


Ability-ana2

  • Ability links also are inline in bulleted lists. You can talk about

Ability Moira Biotic Grasp Biotic Grasp and

Ability-ana1 Biotic Rifle

  • Some abilities share names with other pages, like

Ability-mei4 Blizzard.

  • Does not add any extra space before or after the link ...

Ability-Junkrat2 Concussion Mine...