Template:Messagebox: Difference between revisions

From Fact or Fiction
No edit summary
Tag: Manual revert
m (Updated template)
 
(10 intermediate revisions by the same user not shown)
Line 1: Line 1:
Welcome!
<!-- CONTENT INCLUDED IN PAGE -->
 
<div style="margin: 5px 10px; border-width:1px 1px 1px 10px; border-color: #824295; border-style: solid; border-radius: 0 10px 0 0; padding:5px;">
<includeonly>
{{#if: {{{title|}}} | <div style="font-weight:bold;">{{{title}}}</div> | }}
----
<div>
Message box template
{{#if: {{{1|}}} | {{{1}}} | {{Error|Missing Argument}} }}
==={{{1}}}===
</div>
----
</div>
</includeonly>
<!-- CONTENT NOT INCLUDED IN PAGE -->
 
<onlyinclude></onlyinclude>
 
<noinclude>
<noinclude>
 
==Template usage==
==Purpose==
A general purpose message box to display notifications on a page.
A general purpose message box to display notifications on a page.
 
<pre>
==Syntax==
<nowiki>
<code><nowiki>{{Messagebox
{{Messagebox|<content>
| name=
|title=
| button=
|icon=
| subtitle=
| content=
| cost=
}}
}}
</nowiki></code>
</nowiki>
</pre>


{| class="wikitable"
{| style='cellpadding:0;cellspacing:0;border:none;'
|+ Caption text
|-  
|-
| '''<content>''' || content within the message box
! Parameter !! Default !! Description
|-  
|-
| '''title''' || Optional title
| name || || blah
|-  
|-
| '''icon''' || Optional icon
| subtitle ||  || blah
|-
| description || n/a || blah blah
|}
|}


==Example==
==Examples==
<code><nowiki>{{Messagebox|severity=error|There is an error on this page}}</nowiki></code>
<code><nowiki>{{Messagebox|There is an error on this page}}</nowiki></code>{{Messagebox|This is an informational message}}
<code><nowiki>{{Messagebox|There is an error on this page|title=error}}</nowiki></code>
{{Messagebox|There is an error on this page|title=Error}}
<code><nowiki>{{Messagebox|There is an error on this page|title=error|icon=error}}</nowiki></code>{{Messagebox|There is an error on this page|title=Error|icon=error}}


[[Category:Templates]]
[[Category:Templates]]
[[Category:Todo]]
</noinclude>
</noinclude>

Latest revision as of 07:22, 20 April 2024

! Missing Argument !

Template usage[edit]

A general purpose message box to display notifications on a page.


{{Messagebox|<content>
|title=
|icon=
}}

<content> content within the message box
title Optional title
icon Optional icon

Examples[edit]

{{Messagebox|There is an error on this page}}

This is an informational message

{{Messagebox|There is an error on this page|title=error}}

Error

There is an error on this page

{{Messagebox|There is an error on this page|title=error|icon=error}}

Error

There is an error on this page