Difference between revisions of "Template:Messagebox"

Line 10: Line 10:
 
{{messagebox|This is a message.}}
 
{{messagebox|This is a message.}}
  
You can give a second parameter to change the type of the box:
+
You can give a "type" parameter to change the type of the box:
  
* <code><nowiki>{{messagebox|This is informational.|info}}</nowiki></code> → {{messagebox|This is informational.|info}}
+
* <code><nowiki>{{messagebox|This is informational.|info}}</nowiki></code> → {{messagebox|This is informational.|type=info}}
  
* <code><nowiki>{{messagebox|This is a warning!|warning}}</nowiki></code> → {{messagebox|This is a warning!|warning}}
+
* <code><nowiki>{{messagebox|This is a warning!|warning}}</nowiki></code> → {{messagebox|This is a warning!|type=warning}}
  
</noinclude><includeonly><p class="{{#if:{{{2|}}}|{{{2}}}-box}} message-box"><span>{{{1}}}</span></p></includeonly>
+
</noinclude><includeonly><html><figure</html> class="{{#if:{{{type|}}}|{{{type}}}-box}} message-box"<html>></html><p>{{{1}}}</p><html></figure></html></includeonly>

Revision as of 18:59, 16 May 2023

This template is used for typesetting messages that you want to be set apart from the surrounding text.

For example, the following markup:

{{messagebox|This is a message.}}

will look like this:

This is a message.

You can give a "type" parameter to change the type of the box:

  • {{messagebox|This is informational.|info}}

    This is informational.

  • {{messagebox|This is a warning!|warning}}

    This is a warning!