Template:Condition inline: Difference between revisions

From bg3.wiki
Jump to navigation Jump to search
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}}
Similar to [[Template:Condition]], but exclusively supports inline usage.
This template creates an inline link to a condition page with an accompanying condition icon.


Example: <code><nowiki>{{Cond|Radiating Orb}}</nowiki></code>
== 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).


Result: {{Cond|Radiating Orb}}
== Examples ==
 
{{Template demo
If provided, the second parameter changes the display name of the condition.
| style = table
 
| <nowiki>{{Cond|Radiating Orb}}</nowiki>
Example: <code><nowiki>{{Cond|Radiating Orb|Glowing}}</nowiki></code>
| <nowiki>{{Cond|Bleeding|Bleed}}</nowiki>
 
| <nowiki>{{Cond|Radiating Orb|w = 40}}</nowiki>
Result: {{Cond|Radiating Orb|Glowing}}
| <nowiki>{{Cond|Non-existent condition}}</nowiki>
 
}}
Specifying 'w' changes the width of the icon
 
Example: <code><nowiki>{{Cond|Radiating Orb|w=40}}</nowiki></code>
 
Result: {{Cond|Radiating Orb|w=40}}
 
[[Category:Condition templates]]


== See also ==
== See also ==
* {{t link|condition}}
* {{t link|SAI}} - A similar template used for links to spells, abilities, and passives.
* {{t link|condition list}}
* {{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

Template documentation
Shortcut

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}}
Radiating Orb Radiating Orb
{{Cond|Bleeding|Bleed}}
Bleed Bleed
{{Cond|Radiating Orb|w = 40}}
Radiating Orb Radiating Orb
{{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.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
condition name1

The name of the condition as appears in the condition table. This should generally be the condition page name with "(Condition)" removed.

Stringrequired
altname2

Alternative display name

Stringoptional
widthw

Size in pixels of the condition icon. Generally, you should stick with the default value.

Default
25
Numberoptional