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 (the same icon-then-name form used in navboxes and cross-reference lists) from [[Data:Icons.json]] via [[Module:Iconbox]]. Works for every weapon, character, blessing, upgrade, Crux power, passive, enemy, achievement and codex entry by display name or page slug.
Renders an entity's small icon plus its linked display name. Icons are read from the entity's own record in <code>Data:&lt;Category&gt;.json</code> at render time via [[Module:Iconbox]] (no icon lookup table).


* <code><nowiki>{{Iconbox|Cutter}}</nowiki></code> — icon plus the linked display name (default).
'''Category-first form (preferred — single-category lookup, collision-safe):'''
* <code><nowiki>{{Iconbox|Ember Sword|size=32}}</nowiki></code> — same, bigger icon.
* <code><nowiki>{{Iconbox|Weapon|Cutter}}</nowiki></code> — icon plus the linked display name.
* <code><nowiki>{{Iconbox|Cutter|icononly}}</nowiki></code> — just the linked icon glyph, no name (also <code>mode=icon</code>).
* <code><nowiki>{{Iconbox|Weapon|Cutter|icononly}}</nowiki></code> — just the linked icon glyph (also <code>mode=icon</code>).
* <code><nowiki>{{Iconbox|Cutter|link}}</nowiki></code> — legacy form; <code>link</code> is a no-op alias of the default.
* <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 (a few Crux powers and enemies) degrade gracefully: the default mode renders the plain page link, icon-only mode renders nothing.
'''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 Data:Icons.json (icon-only behind a flag).",
   "description": "Entity icon + linked display name, read from the entity's source record at render time.",
   "params": {
   "params": {
     "1": {"label": "Entity name or slug", "required": true},
     "1": {"label": "Category (Weapon/Blessing/...) or bare entity name", "required": true},
     "2": {"label": "Mode: 'icononly' (or 'icon') for just the glyph; default/'link' renders icon + linked name"},
     "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 (also mode=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.

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
Category (Weapon/Blessing/...) or bare entity name1

no description

Unknownrequired
Entity name (category-first form), or mode for the bare form2

no description

Unknownoptional
Mode: 'icononly' for just the glyph (category-first form)3

no description

Unknownoptional
Icon size in pxsize

no description

Default
24
Unknownoptional