Template:Message box: Difference between revisions

You know what, let's set standard widths and allow custom CSS
added rudimentary icon support
Line 1: Line 1:
<div style="{{msgbox/style|{{{type|normal}}} | bgcol = {{{bgcol|#FFFFCC}}} | linecol = {{{linecol|#616161}}} }} {{{css|}}}">
<div style="{{msgbox/style|{{{type|normal}}} | bgcol = {{{bgcol|#FFFFCC}}} | linecol = {{{linecol|#616161}}} }} {{{css|}}}">
{{#if: {{{title|}}} | '''{{{title|}}}''' }} {{#if: {{{discuss|}}} | <sup>[[{{TALKPAGENAME}}|Discuss]]</sup> }}
{{#if: {{{icon|}}} | {{CommentSprite| {{{icon}}} }} }} {{#if: {{{title|}}} | '''{{{title|}}}''' }} {{#if: {{{discuss|}}} | <sup>[[{{TALKPAGENAME}}|Discuss]]</sup> }}
{{#if: {{{text|}}} |<br />{{{text}}} }}
{{#if: {{{text|}}} |<br />{{{text}}} }}
</div><noinclude>
</div><noinclude>
Line 19: Line 19:
{{msgbox
{{msgbox
| type = mini
| type = mini
| title = This is a mini message box
| icon = 8
| title = This is a mini message box with an information icon using [[Template:CommentSprite]]
}}
}}
</pre>
</pre>


Will result in:
Will result in:
{{msgbox| type = mini | title = This is a mini message box}}
{{msgbox| type = mini | icon = 8 | title = This is a mini message box with an information icon using [[Template:CommentSprite]]}}


=== Advanced usage ===
=== Advanced usage ===