Template:WarnAlt/doc: Difference between revisions

From Caps Wiki
Jump to navigation Jump to search
(new template data at Template:WarnAlt)
(spsd by new td block on main template page)
Line 5: Line 5:
For the source editor, the syntax is <code><nowiki>{{WarnAlt|<note|caution|warning|danger>|<large|medium/med|small>|<message>}}</nowiki></code>.<br>
For the source editor, the syntax is <code><nowiki>{{WarnAlt|<note|caution|warning|danger>|<large|medium/med|small>|<message>}}</nowiki></code>.<br>
The visual editor provides a nice popup box where you can fill in all the data, but the same arguments apply.
The visual editor provides a nice popup box where you can fill in all the data, but the same arguments apply.
<!--
<templatedata>
{
"description": "Add warnings about possible dangers",
"params": {
"severity": {
"description": "Severity of the warning. Can be note, caution, warning or danger.",
"required": true,
"aliases": [
"1"
],
"type": "string"
},
"size": {
"description": "Size of the warning. Can be large, medium, med or small",
"required": true,
"aliases": [
"2"
],
"type": "string"
},
"message": {
"description": "The message to show in the warning box.",
"required": true,
"aliases": [
"3"
],
"type": "string"
}
}
}
</templatedata>
-->

Revision as of 15:34, 13 February 2022

Documentation

This template is an intended replacement for the {{warn}} template. It has four different severity levels and three different sizes, which are demonstrated here.

Syntax

For the source editor, the syntax is {{WarnAlt|<note|caution|warning|danger>|<large|medium/med|small>|<message>}}.
The visual editor provides a nice popup box where you can fill in all the data, but the same arguments apply.