Template:Def
Template page
More actions
?
Template:def
This template renders a Definitions v1 term using an explicit (Domain, Key) pair.
It calls Module:Definitions and resolves data from Module:Definitions/Definitions.json.
Usage
{{def|Domain|Key}}
Examples:
{{def|Stat|Vit}}
{{def|Element|Fire}}
{{def|Cast|Ground}}
{{def|Target|Summon}}
Parameters
- 1 (Domain)
- The definition domain. This value is required.
- 2 (Key)
- The definition key within the domain (CamelCase). This value is required.
Supported Domains (v1)
- Cast
- Damage
- Element
- Aura
- Event
- Stance
- Stat
- Target
Behavior
- If the record has a non-empty Definition, a tooltip is available (hover on desktop, tap on mobile).
- If Definition is empty, tooltip behavior is disabled.
- If Name is empty, the Key is displayed in a humanized form.
- If the record is missing, a missing placeholder is displayed.
- If Link is non-empty, the term text is rendered as a real clickable link.
Styling
- CSS is provided via TemplateStyles at: Template:def/styles.css
- CSS namespace: sv-def only
JavaScript
- Tooltip behavior is implemented in: MediaWiki:Common.js
Renders a Definitions v1 term using an explicit (Domain, Key) pair.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Domain | 1 | Definition domain. Supported v1 domains: Cast, Damage, Element, Aura, Event, Stance, Stat, Target.
| String | required |
| Key | 2 | Definition key within the domain (CamelCase). Example: Vit, Fire, Ground, Summon.
| String | required |