Template:Caution: Difference between revisions

[unchecked revision][pending revision]
Content deleted Content added
m 1 revision imported
No edit summary
Tag: 2017 source edit
 
(8 intermediate revisions by one other user not shown)
Line 1:
<onlyinclude>{{Note|{{{1}}}|{{{2|caution}}}|{{{3|Caution:}}}}}</onlyinclude>
<includeonly>{{#if: {{{1|}}}|<table cellspacing="0" cellpadding="0" border="0" style="background: transparent;"><tr><td nowrap="nowrap" valign="top">}}<span style="position: relative; top: -2px;">[[File:Caution.png|20px|2em|Warning|link=]]</span> '''Caution''': {{#if: {{{1|}}}|</td><td valign="top" style="padding-left:0.5em;">{{{1|}}}</td></tr></table>}}</includeonly><noinclude>
</noinclude><templatedata>
 
{
== Usage ==
"params": {
 
"1": {
This template has two possible usages:
"label": "Caution Text",
# Will have the text flow below when the caution text is too long
"example": "Do not continue until Step XYZ is complete",
# Uses a table to indent the text.
"type": "string",
 
"required": true
=== Method 1 ===
},
 
"2": {
The following displays the warning icon and the word 'Warning:'. You can follow this with whatever text/images/markup you like.
"label": "Icon or Background Color",
 
"description": "Optional Change the Icon or Background Color",
Wiki Code:
"example": "caution, warning, tip, info, info-blue, reminder-yellow, caution-red",
<nowiki>{{Caution}}</nowiki> Be careful!
"type": "string"
 
},
{{Caution}} Don't do that!
"3": {
 
"label": "Option to change leading text",
=== Method 2 ===
"example": "Note: Caution: or Warning:",
The following includes the text passed to the template, and uses a table to stop the text flowing round the icon.
"type": "string"
 
}
Wiki Code:
},
<nowiki>{{Caution|Here is a long warning, which is sufficiently wordy to run onto a second line (unless you have a really large screen!),
"description": "Show a Caution",
which would normally cause it to wrap round the icon, but because we passed it as a parameter
"paramOrder": [
it keeps its left alignment straight.}}</nowiki>
"1",
 
"2",
{{Caution|Here is a long caution, which is sufficiently wordy to run onto a second line (unless you have a really large screen!), which would normally cause it to wrap round the icon, but because we passed it as a parameter it keeps its left alignment straight.}}
"3"
 
],
{{Languages|Template:Warning}}
"format": "inline"
[[Category:Templates|{{PAGENAME}}]]
}
</noinclude>
</templatedata>
[[Category:AutoDumpContentFromCommons]]</noinclude>