Template:Message box: Difference between revisions

From Modded Wiki
Jump to navigation Jump to search
m defaults test...
You know what, let's set standard widths and allow custom CSS
Line 1: Line 1:
<div style="{{msgbox/style|{{{type|normal}}}|width={{{width|}}}|bgcol={{{bgcol|}}}|linecol={{{linecol|}}}}}">
<div style="{{msgbox/style|{{{type|normal}}} | bgcol = {{{bgcol|#FFFFCC}}} | linecol = {{{linecol|#616161}}} }} {{{css|}}}">
{{#if: {{{title|}}} | '''{{{title}}}''' }} {{#if: {{{discuss|}}} | <sup>[[{{TALKPAGENAME}}|Discuss]]</sup> }}
{{#if: {{{title|}}} | '''{{{title|}}}''' }} {{#if: {{{discuss|}}} | <sup>[[{{TALKPAGENAME}}|Discuss]]</sup> }}
{{#if: {{{subtitle|}}} |<br />{{{subtitle}}} }}
{{#if: {{{text|}}} |<br />{{{text}}} }}
</div><noinclude>
</div><noinclude>
{{msgbox
| title = Sample message box
| subtitle = Sample message box
}}
== Usage ==
== Usage ==
=== Basic usage ===
=== Basic usage ===
Line 13: Line 8:
{{msgbox
{{msgbox
| title = This is a normal message box
| title = This is a normal message box
| subtitle = With helpful and descriptive subtext
| text = With helpful and descriptive subtext
}}
}}
</pre>
</pre>


Will result in:
Will result in:
{{msgbox| title = This is a normal message box | subtitle = With helpful and descriptive subtext}}
{{msgbox| title = This is a normal message box | text = With helpful and descriptive subtext}}


=== Mini usage ===
=== Mini usage ===
Line 35: Line 30:
{{msgbox
{{msgbox
| type = normal
| type = normal
| width = 640px
| bgcol = #eef
| bgcol = #eef
| linecol = #ddf
| linecol = #ddf
| title = This is a blue message box
| title = This is a blue message box
| subtitle = It has a discuss link and custom width
| text = It has a discuss link and custom CSS
| discuss = true
| discuss = true
| css = width: 320px; font-size: x-large;
}}
}}
</pre>
</pre>


Will result in:
Will result in:
{{msgbox| type = normal | width = 640px | bgcol = #eef | linecol = #ddf | title = This is a blue message box | subtitle = It has a discuss link and custom width | discuss = true}}
{{msgbox| type = normal | bgcol = #eef | linecol = #ddf | title = This is a blue message box | text = It has a discuss link and custom width | discuss = true | css = width: 320px; font-size: x-large;}}


[[Category:Box templates]]
[[Category:Box templates]]
</noinclude>
</noinclude>

Revision as of 17:50, 12 February 2011


Usage

Basic usage

{{msgbox
| title = This is a normal message box
| text = With helpful and descriptive subtext
}}

Will result in:

This is a normal message box
With helpful and descriptive subtext

Mini usage

{{msgbox
| type = mini
| title = This is a mini message box
}}

Will result in:

This is a mini message box

Advanced usage

{{msgbox
| type = normal
| bgcol = #eef
| linecol = #ddf
| title = This is a blue message box
| text = It has a discuss link and custom CSS
| discuss = true
| css = width: 320px; font-size: x-large;
}}

Will result in:

This is a blue message box Discuss
It has a discuss link and custom width