Template:Condition inline: Difference between revisions
HiddenDragon (talk | contribs) mNo edit summary |
(Updated documentation and added category) |
||
Line 10: | Line 10: | ||
| default = [[{{{1}}} (Condition)|{{{2|{{{1}}}}}}]]{{Main namespace only|[[Category:Pages with unknown conditions]]}} | | default = [[{{{1}}} (Condition)|{{{2|{{{1}}}}}}]]{{Main namespace only|[[Category:Pages with unknown conditions]]}} | ||
}}</includeonly><noinclude>{{documentation|content={{shortcut|cond}} | }}</includeonly><noinclude>{{documentation|content={{shortcut|cond}} | ||
This template creates an inline link to a condition page with an accompanying condition icon. | |||
== Usage == | |||
This template looks up conditions from the [[Special:CargoTables/conditions|conditions Cargo table]], and thus the first parameter should match an entry in this table. If provided, the second parameter changes the display name of the condition. | |||
Specifying the optional {{c|w}} parameter changes the width of the icon (default 25). | |||
== Examples == | |||
{{Template demo | |||
| style = table | |||
| <nowiki>{{Cond|Radiating Orb}}</nowiki> | |||
| <nowiki>{{Cond|Bleeding|Bleed}}</nowiki> | |||
| <nowiki>{{Cond|Radiating Orb|w = 40}}</nowiki> | |||
| <nowiki>{{Cond|Non-existent condition}}</nowiki> | |||
}} | |||
== See also == | == See also == | ||
* {{t link| | * {{t link|SAI}} - A similar template used for links to spells, abilities, and passives. | ||
* {{t link|condition | * {{t link|Condition}} - Displays more detailed information about a condition. | ||
* {{t link|Condition page}} - Page generating template responsible for adding a condition into the condition Cargo table so that it can be referenced by this template. | |||
== Template data == | == Template data == | ||
<templatedata> | <templatedata> | ||
{ | { | ||
"description": "Display a link to a condition accompanied by the condition icon.", | |||
"params": { | "params": { | ||
"1": { | "1": { | ||
"label": "condition name", | "label": "condition name", | ||
"description": "The name of the condition as appears in the condition table. This should generally be the condition page name with \"(Condition)\" removed.", | |||
"type": "string", | "type": "string", | ||
"required": true | "required": true | ||
Line 48: | Line 45: | ||
"description": "Alternative display name", | "description": "Alternative display name", | ||
"type": "string" | "type": "string" | ||
}, | |||
"w": { | |||
"label": "width", | |||
"description": "Size in pixels of the condition icon. Generally, you should stick with the default value.", | |||
"default": "25", | |||
"type": "number" | |||
} | } | ||
}, | }, | ||
"format": "inline" | "format": "inline" | ||
} | } | ||
</templatedata>}}</noinclude> | </templatedata>}} | ||
[[Category:Templates]] | |||
[[Category:Link templates]] | |||
[[Category:Condition templates]] | |||
</noinclude> |
Latest revision as of 22:27, 21 July 2024
- {{cond}}
This template creates an inline link to a condition page with an accompanying condition icon.
Usage
This template looks up conditions from the conditions Cargo table, and thus the first parameter should match an entry in this table. If provided, the second parameter changes the display name of the condition.
Specifying the optional w
parameter changes the width of the icon (default 25).
Examples
Markup | Renders as |
---|---|
{{Cond|Radiating Orb}} | |
{{Cond|Bleeding|Bleed}} | |
{{Cond|Radiating Orb|w = 40}} | |
{{Cond|Non-existent condition}} | Non-existent condition |
See also
- {{SAI}} - A similar template used for links to spells, abilities, and passives.
- {{Condition}} - Displays more detailed information about a condition.
- {{Condition page}} - Page generating template responsible for adding a condition into the condition Cargo table so that it can be referenced by this template.
Template data
Display a link to a condition accompanied by the condition icon.
Parameter | Description | Type | Status | |
---|---|---|---|---|
condition name | 1 | The name of the condition as appears in the condition table. This should generally be the condition page name with "(Condition)" removed. | String | required |
altname | 2 | Alternative display name | String | optional |
width | w | Size in pixels of the condition icon. Generally, you should stick with the default value.
| Number | optional |