Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Condition: Difference between revisions

Template page
Add example with type
Split off documentation
 
(34 intermediate revisions by 5 users not shown)
Line 1: Line 1:
<includeonly><onlyinclude>{{#if:{{{border|}}}|<div style="padding-bottom: 1em"><div class="bg3wiki-tooltip-box">||}}{{#cargo_query: tables = conditions
<includeonly><onlyinclude>{{#if:{{{border|}}}|<div style="padding-bottom: 1em"><div class="bg3wiki-tooltip-box">||}}{{#cargo_query: tables = conditions
| fields = name, icon, effects, type, CONCAT('{{{save|}}}') = save, CONCAT('{{{duration|}}}') = duration, CONCAT('{{{inline|}}}') = inline, CONCAT('{{#replace:{{{altname|}}}|'|"}}') = altname
| fields = _pageName=page, name, icon, effects, types, CONCAT('{{{save|}}}') = save, CONCAT('{{{duration|}}}') = duration, CONCAT('{{{inline|}}}') = inline, CONCAT('{{#replace:{{{altname|}}}|'|\'}}') = altname, CONCAT('{{#replace:{{{radius m|}}}|'|\'}}') = radius m, CONCAT('{{#replace:{{{dc|}}}|'|"}}') = dc, CONCAT('{{#if:{{{w|}}}|{{{w}}}|25}}') = w,
| where = name = '{{#replace: {{{1}}} | ' | '' }}'
| where = _pageName = "{{#replace:{{{1}}}|&#39;|\'}} (Condition)"
| format = template
| format = template
| template = Condition/Format
| template = Condition/Format
Line 8: Line 8:
| order by = _ID
| order by = _ID
| more results text=
| more results text=
}}{{#if:{{{border|}}}|</div></div>||}}</onlyinclude></includeonly><noinclude>
| default = [[{{{1}}} (Condition)|{{{1}}}]]{{Main namespace only|[[Category:Pages with unknown conditions]]}}
Use this to display a condition.  Examples follow.
}}{{#if:{{{border|}}}|</div></div>||}}</onlyinclude></includeonly><noinclude>{{documentation}}
 
[[Category:Templates]]
This template just runs the Cargo query.  For the formatting, see: [[Template:Condition/Format]]
[[Category:Condition templates]]
 
[[Category:Cargo templates]]
=== Base usage ===
 
Usage:
 
<pre>
{{Condition | Bleeding }}
</pre>
 
Result:
----
{{Condition | Bleeding }}
----
 
=== With duration ===
 
Usage:
 
<pre>
{{Condition | Bleeding | duration = 2 }}
</pre>
 
Result:
----
{{Condition | Bleeding | duration = 2 }}
----
 
=== With saving throw ===
 
Usage:
 
<pre>
{{Condition | Bleeding | save = CON }}
</pre>
 
Result:
----
{{Condition | Bleeding | save = CON }}
----
 
=== With duration and saving throw ===
 
Usage:
 
<pre>
{{Condition | Bleeding | save = CON | duration = 2 }}
</pre>
 
Result:
----
{{Condition | Bleeding | save = CON | duration = 2 }}
----
 
=== With a border ===
 
Use {{InfoBlob|<nowiki>border = 1</nowiki>}} to add a border.
 
<pre>
{{Condition | Bleeding | save = CON | duration = 2 | border = 1}}
</pre>
 
Result:
----
{{Condition | Bleeding | save = CON | duration = 2 | border = 1}}
----
 
=== Inline-friendly ===
 
Usage:
<pre>
{{Condition | Bleeding | inline = true }}
</pre>
 
Result: blabla {{Condition | Bleeding | inline = true }} blabla
 
=== Alternative display name ===
<pre>
{{Condition | Bleeding | save = CON | altname=oh no i'm bleeding | duration = 2 }}
</pre>
 
Result:
{{Condition | Bleeding | save = CON | altname=oh no i'm bleeding | duration = 2 }}
 
== Also displays types ==
{{Condition | Feverish }}
 
</noinclude>
</noinclude>