5,787
editsAd placeholder
Template:Condition inline: Difference between revisions
Jump to navigation
Jump to search
Updated documentation and added category
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> |