Template:Msgbox: Difference between revisions

m (1 revision)
(Fix class)
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>
<includeonly>
{| class="alert {{ #if: {{{type|}}} | {{#switch: {{{type}}} | danger = alert-error | error = alert-error | success = alert-success | warning = | alert-info}} | alert-info }} }}" style="border-collapse: inherit;{{#if: {{{width|}}} | max-width: {{{width}}}; }}<!--
<div class="alert {{ #if: {{{type|}}} | {{#switch: {{{type}}} | danger = alert-danger | error = alert-danger | success = alert-success | warning = alert-warning|info = alert-info}} | alert-info }}">{{{text}}}</div><!--
-->{{#if: {{{mini|}}} | padding: 0px 6px 0px 1px; margin: 0 0 1em; | padding: 3px 12px 3px 7px; margin: 0 auto 1em; text-align:center; }} {{{css|}}}"
--></includeonly><noinclude>[[Category:Notice templates|{{BASEPAGENAME}}]]
|-
| style="vertical-align: middle;" | {{#if: {{{icon|}}} | <i class="{{{icon}}}"></i> |}}
| style="border: none" | {{#if: {{{title|}}} | '''{{{title}}}''' {{#if: {{{discuss|}}} | <sup>[[{{TALKPAGENAME}}{{#if:{{{discussAnchor|}}} | &#35;{{{discussAnchor}}} }}|Discuss]]</sup> }} }}<!--
-->{{#if: {{{text|}}} | {{#if: {{{title|}}} | <div>{{{text}}}</div> | {{{text}}} }} }}
|}</includeonly><noinclude>[[Category:Notice templates|{{BASEPAGENAME}}]]
{{documentation}}</noinclude>
{{documentation}}</noinclude>

Latest revision as of 21:03, 9 November 2013

[edit] [history] [purge] File:Template-info.png Template documentation

Basic usage

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

Will result in:

With helpful and descriptive subtext

Types

To change a message boxes's connotation use the type parameter.

Warning

| type = warning


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

Will result in:


With helpful and descriptive subtext

Error or danger

| type = error


{{msgbox
| type = error
| title = This is an error message box
| text = With helpful and descriptive subtext
}}

Will result in:


With helpful and descriptive subtext

Success

| type = success


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

Will result in:

With helpful and descriptive subtext


Information

Leaving out the type parameter will give you the default information alert.


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

Will result in:

With helpful and descriptive subtext

Mini usage

{{msgbox
| mini = 1
| icon = icon-upload
| text = This is a mini message box with an information icon using [[Help:Icons|Icons]]
}}

Will result in:

This is a mini message box with an information icon using Icons

Advanced CSS usage

{{msgbox
| type = success
| title = This is a green message box
| text = It has a discuss link and some custom CSS.
| discuss = 1
| css = -moz-box-shadow: 0px 0px 6px #888; -webkit-box-shadow: 0px 0px 6px #888;
}}

Will result in:


It has a discuss link and some custom CSS.

{{msgbox
| type = success
| title = This is a green message box

| text = It has a discuss link, some custom CSS and a custom image
| discuss = 1
| css = -moz-box-shadow: 0px 0px 6px #888; -webkit-box-shadow: 0px 0px 6px #888;
}}

Will result in:


It has a discuss link, some custom CSS and a custom image
Cookies help us deliver our services. By using our services, you agree to our use of cookies.

Need wiki hosting?

Do you need a wiki for your Minecraft mod/gaming wiki? We'll host it for free! Contact us.

Other wikis

Indie-game wikis
Powered by Indie Wikis