Difference between revisions of "Template:Warning"

From wiki
(Add bottom margin)
(Add templatedata)
 
Line 1: Line 1:
 +
<noinclude>
 +
== Description ==
 +
<templatedata>
 +
{
 +
"description": "Show warning sign or box",
 +
"params": {
 +
"msg": {
 +
"aliases": [
 +
"1"
 +
],
 +
"label": "Message",
 +
"type": "content",
 +
"suggested": true,
 +
"description": "Message to be displayed in the warning box",
 +
"default": "If no message is provided only a warning icon will be generated",
 +
"example": "This page will self-destruct in five seconds. Good luck, Jim."
 +
}
 +
}
 +
}
 +
</templatedata>
 +
 +
== Examples ==
 +
 +
<nowiki>{{Warning}}This page will self-destruct in five seconds. Good luck, Jim.</nowiki>
 +
 +
{{Warning}}This page will self-destruct in five seconds. Good luck, Jim.
 +
 +
<nowiki>{{Warning|This page will self-destruct in five seconds. Good luck, Jim.}}</nowiki>
 +
 +
{{Warning|This page will self-destruct in five seconds. Good luck, Jim.}}
 +
 +
</noinclude>
 
<includeonly>{{#if: {{{msg|{{{1|}}}}}}|<table cellspacing="0" cellpadding="0" border="0" style="background: transparent; margin-top:0.5em; margin-bottom:0.5em; border:1px #b52 solid;padding:0.5em;background-color: #fef7f5"><tr><td nowrap="nowrap" valign="top">}}<span style="position: relative; top: -2px;">[[File:Attention niels epting.svg|18px|
 
<includeonly>{{#if: {{{msg|{{{1|}}}}}}|<table cellspacing="0" cellpadding="0" border="0" style="background: transparent; margin-top:0.5em; margin-bottom:0.5em; border:1px #b52 solid;padding:0.5em;background-color: #fef7f5"><tr><td nowrap="nowrap" valign="top">}}<span style="position: relative; top: -2px;">[[File:Attention niels epting.svg|18px|
Warning|link=]]</span> '''
+
Warning|link=]]</span> '''Warning:''' {{#if: {{{msg|{{{1|}}}}}}|</td><td valign="top" style="padding-left:0.5em;">{{{msg|{{{1|}}}}}}</td></tr></table>}}</includeonly>
Warning:''' {{#if: {{{msg|{{{1|}}}}}}|</td><td valign="top" style="padding-left:0.5em;">{{{msg|{{{1|}}}}}}</td></tr></table>}}</includeonly>
 

Latest revision as of 06:02, 2 January 2016

Description

Show warning sign or box

Template parameters

ParameterDescriptionTypeStatus
Messagemsg 1

Message to be displayed in the warning box

Default
If no message is provided only a warning icon will be generated
Example
This page will self-destruct in five seconds. Good luck, Jim.
Contentsuggested

Examples

{{Warning}}This page will self-destruct in five seconds. Good luck, Jim.


Warning Warning: This page will self-destruct in five seconds. Good luck, Jim.

{{Warning|This page will self-destruct in five seconds. Good luck, Jim.}}


Warning Warning: This page will self-destruct in five seconds. Good luck, Jim.