Template:FactionIcon: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
Add the Burning Crusade |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
<includeonly>{{#switch:{{{1|}}} | <includeonly>{{#switch:{{{1|}}} | ||
|alliance = [[File:alliance_64.png|{{{2|20}}}px|link=Alliance|Alliance]] | |alliance = [[File:alliance_64.png|{{{2|20}}}px|link=Alliance of Lordaeron|Alliance of Lordaeron]] | ||
|horde = [[File:horde_64.png|{{{2|20}}}px|link=Horde|Horde]] | |horde = [[File:horde_64.png|{{{2|20}}}px|link=Horde|Horde]] | ||
|ashen = [[File:ashen.png|{{{2|20}}}px|link=Ashen Covenant|Ashen Covenant]] | |ashen = [[File:ashen.png|{{{2|20}}}px|link=Ashen Covenant|Ashen Covenant]] | ||
| Line 7: | Line 7: | ||
|combat = [[File:combat_64.png|{{{2|20}}}px|link=Combat|Combat]] | |combat = [[File:combat_64.png|{{{2|20}}}px|link=Combat|Combat]] | ||
|scourge = [[File:scourge.png|{{{2|20}}}px|link=Scourge|Scourge]] | |scourge = [[File:scourge.png|{{{2|20}}}px|link=Scourge|Scourge]] | ||
|burning = [[File:Burningcrusade.svg|{{{2|20}}}px|link=Burning Crusade|Burning Crusade]] | |||
}}</includeonly><noinclude> | }}</includeonly><noinclude> | ||
{{Documentation}} | {{Documentation}} | ||
[[category:Templates]] | |||
</noinclude> | </noinclude> | ||
Latest revision as of 3:08 PM, October 6, 2026
The FactionIcon template displays a small icon representing a character or creature's faction. It is intended primarily for use in infoboxes and other templates, but may also be used within article text.
Usage
{{FactionIcon|faction}}
An optional second parameter specifies the size of the icon in pixels:
{{FactionIcon|faction|size}}
If no size is specified, the icon is displayed at 20 pixels.
Parameters
| Parameter | Description | Required | Default |
|---|---|---|---|
1
|
Faction identifier. See the table below for accepted values. | Yes | — |
2
|
Size of the icon in pixels. Enter the number only, without px.
|
No | 20 |
Factions
| Value | Faction | Example |
|---|---|---|
alliance
|
Alliance of Lordaeron | |
horde
|
Horde | |
ashen
|
Ashen Covenant | |
guardians
|
Guardians of Hyjal | |
neutral
|
Neutral | |
combat
|
Combat | |
scourge
|
Scourge |
Examples
Default size
{{FactionIcon|alliance}}
Produces:
Custom size
{{FactionIcon|horde|32}}
Produces:
Use in an infobox
The template may be passed through another template parameter. For example:
{{NPCBox
|name = Example NPC
|faction = alliance
}}
When used with Template:npcbox, the faction value is passed to this template and the corresponding icon is displayed beside the character's name.
Notes
- Faction identifiers are lowercase and must match one of the accepted values listed above.
- The second parameter should contain only the numerical size. For example, use
|32, not|32px. - If the second parameter is omitted, the icon defaults to 20 pixels.
- Each icon links to the corresponding faction's article.
- An unrecognized or empty faction value produces no output.