From Arms of God Wiki
bot: Iconbox default now icon + linked name; icononly flag added (operator iteration 2026-06-10) |
bot: Iconbox category-first signature; icons from source records |
||
| Line 1: | Line 1: | ||
<includeonly>{{#invoke:Iconbox|render|{{{1|}}}|{{{2|}}}|mode={{{mode|}}}|size={{{size|24}}}}}</includeonly><noinclude> | <includeonly>{{#invoke:Iconbox|render|{{{1|}}}|{{{2|}}}|{{{3|}}}|mode={{{mode|}}}|size={{{size|24}}}}}</includeonly><noinclude> | ||
== Usage == | == Usage == | ||
Renders an entity's small icon plus its linked display name | Renders an entity's small icon plus its linked display name. Icons are read from the entity's own record in <code>Data:<Category>.json</code> at render time via [[Module:Iconbox]] (no icon lookup table). | ||
* <code><nowiki>{{Iconbox|Cutter}}</nowiki></code> — icon plus the linked display name | '''Category-first form (preferred — single-category lookup, collision-safe):''' | ||
* <code><nowiki>{{Iconbox| | * <code><nowiki>{{Iconbox|Weapon|Cutter}}</nowiki></code> — icon plus the linked display name. | ||
* <code><nowiki>{{Iconbox|Weapon|Cutter|icononly}}</nowiki></code> — just the linked icon glyph (also <code>mode=icon</code>). | |||
* <code><nowiki>{{Iconbox| | * <code><nowiki>{{Iconbox|Blessing|Sanctified Halo|size=32}}</nowiki></code> — bigger icon. | ||
Category accepts singular or plural: Weapon, Character, Blessing, Upgrade, Crux, Passive, Enemy, Achievement, Codex, Tag. | |||
Entities without staged art | '''Bare-name fallback (cross-category scan; first matching category wins):''' | ||
* <code><nowiki>{{Iconbox|Cutter}}</nowiki></code> / <code><nowiki>{{Iconbox|Cutter|icononly}}</nowiki></code> | |||
Entities without staged art degrade gracefully: the default mode renders the plain page link, icon-only mode renders nothing. | |||
<templatedata> | <templatedata> | ||
{ | { | ||
"description": "Entity icon + linked display name from | "description": "Entity icon + linked display name, read from the entity's source record at render time.", | ||
"params": { | "params": { | ||
"1": {"label": " | "1": {"label": "Category (Weapon/Blessing/...) or bare entity name", "required": true}, | ||
"2": {"label": "Mode: 'icononly' | "2": {"label": "Entity name (category-first form), or mode for the bare form"}, | ||
"3": {"label": "Mode: 'icononly' for just the glyph (category-first form)"}, | |||
"size": {"label": "Icon size in px", "default": "24"} | "size": {"label": "Icon size in px", "default": "24"} | ||
}, | }, | ||
"paramOrder": ["1", "2", "size"] | "paramOrder": ["1", "2", "3", "size"] | ||
} | } | ||
</templatedata> | </templatedata> | ||
[[Category:Universal templates]] | [[Category:Universal templates]] | ||
</noinclude> | </noinclude> | ||
Latest revision as of 08:29, 10 June 2026
Usage
Renders an entity's small icon plus its linked display name. Icons are read from the entity's own record in Data:<Category>.json at render time via Module:Iconbox (no icon lookup table).
Category-first form (preferred — single-category lookup, collision-safe):
{{Iconbox|Weapon|Cutter}}— icon plus the linked display name.{{Iconbox|Weapon|Cutter|icononly}}— just the linked icon glyph (alsomode=icon).{{Iconbox|Blessing|Sanctified Halo|size=32}}— bigger icon.
Category accepts singular or plural: Weapon, Character, Blessing, Upgrade, Crux, Passive, Enemy, Achievement, Codex, Tag.
Bare-name fallback (cross-category scan; first matching category wins):
{{Iconbox|Cutter}}/{{Iconbox|Cutter|icononly}}
Entities without staged art degrade gracefully: the default mode renders the plain page link, icon-only mode renders nothing.
Entity icon + linked display name, read from the entity's source record at render time.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Category (Weapon/Blessing/...) or bare entity name | 1 | no description | Unknown | required |
| Entity name (category-first form), or mode for the bare form | 2 | no description | Unknown | optional |
| Mode: 'icononly' for just the glyph (category-first form) | 3 | no description | Unknown | optional |
| Icon size in px | size | no description
| Unknown | optional |