Template:FactionIcon: Difference between revisions
Jump to navigation
Jump to search
Created page with "<includeonly>{{#switch:{{{1|}}} |Alliance = {{{2|20}}}px|link=Alliance|Alliance |Horde = {{{2|20}}}px|link=Horde|Horde |Ashen Covenant = {{{2|20}}}px|link=Ashen Covenant|Ashen Covenant |Guardians of Hyjal = {{{2|20}}}px|link=Guardians of Hyjal|Guardians of Hyjal |Neutral = {{{2|20}}}px|link=Neutral|Neutral |Combat = {{{2|20}}}px|link=Combat|Combat }..." |
No edit summary |
||
| Line 1: | Line 1: | ||
<includeonly>{{#switch:{{{1|}}} | <includeonly>{{#switch:{{{1|}}} | ||
| | |alliance = [[File:alliance_64.png|{{{2|20}}}px|link=Alliance|Alliance]] | ||
| | |horde = [[File:horde_64.png|{{{2|20}}}px|link=Horde|Horde]] | ||
| | |ashen = [[File:ashen.png|{{{2|20}}}px|link=Ashen Covenant|Ashen Covenant]] | ||
| | |guardians = [[File:guardians_64.png|{{{2|20}}}px|link=Guardians of Hyjal|Guardians of Hyjal]] | ||
| | |neutral = [[File:neutral.png|{{{2|20}}}px|link=Neutral|Neutral]] | ||
| | |combat = [[File:combat_64.png|{{{2|20}}}px|link=Combat|Combat]] | ||
|scourge = [[File:scourge.png|{{{2|20}}}px|link=Scourge|Scourge]] | |||
}}</includeonly><noinclude> | }}</includeonly><noinclude> | ||
{{Documentation}} | {{Documentation}} | ||
</noinclude> | </noinclude> | ||
Revision as of 7:38 PM, September 11, 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.