Template:FactionIcon/doc: Difference between revisions

From Azeroth Gazetteer
Jump to navigation Jump to search
mNo edit summary
No edit summary
 
Line 42: Line 42:
|-
|-
| <code>alliance</code>
| <code>alliance</code>
| [[Alliance]]
| [[Alliance of Lordaeron]]
| {{FactionIcon|alliance}}
| {{FactionIcon|alliance}}
|-
|-

Latest revision as of 9:19 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 Alliance of Lordaeron
horde Horde Horde
ashen Ashen Covenant Ashen Covenant
guardians Guardians of Hyjal Guardians of Hyjal
neutral Neutral Neutral
combat Combat Combat
scourge Scourge Scourge

Examples

Default size

{{FactionIcon|alliance}}

Produces:

Alliance of Lordaeron

Custom size

{{FactionIcon|horde|32}}

Produces:

Horde

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.