Template:Mbox: Difference between revisions

From Cheaha
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
<div>
<mediawiki xsi:schemaLocation="http://www.mediawiki.org/xml/export-0.8/ http://www.mediawiki.org/xml/export-0.8.xsd" version="0.8" xml:lang="en"><siteinfo><sitename>MediaWiki</sitename><base>http://www.mediawiki.org/wiki/MediaWiki</base><generator>MediaWiki 1.22wmf12</generator><case>first-letter</case><namespaces><namespace key="-2" case="first-letter">Media</namespace><namespace key="-1" case="first-letter">Special</namespace><namespace key="0" case="first-letter"/><namespace key="1" case="first-letter">Talk</namespace><namespace key="2" case="first-letter">User</namespace><namespace key="3" case="first-letter">User talk</namespace><namespace key="4" case="first-letter">Project</namespace><namespace key="5" case="first-letter">Project talk</namespace><namespace key="6" case="first-letter">File</namespace><namespace key="7" case="first-letter">File talk</namespace><namespace key="8" case="first-letter">MediaWiki</namespace><namespace key="9" case="first-letter">MediaWiki talk</namespace><namespace key="10" case="first-letter">Template</namespace><namespace key="11" case="first-letter">Template talk</namespace><namespace key="12" case="first-letter">Help</namespace><namespace key="13" case="first-letter">Help talk</namespace><namespace key="14" case="first-letter">Category</namespace><namespace key="15" case="first-letter">Category talk</namespace><namespace key="90" case="first-letter">Thread</namespace><namespace key="91" case="first-letter">Thread talk</namespace><namespace key="92" case="first-letter">Summary</namespace><namespace key="93" case="first-letter">Summary talk</namespace><namespace key="100" case="first-letter">Manual</namespace><namespace key="101" case="first-letter">Manual talk</namespace><namespace key="102" case="first-letter">Extension</namespace><namespace key="103" case="first-letter">Extension talk</namespace><namespace key="104" case="first-letter">API</namespace><namespace key="105" case="first-letter">API talk</namespace><namespace key="106" case="first-letter">Skin</namespace><namespace key="107" case="first-letter">Skin talk</namespace><namespace key="828" case="first-letter">Module</namespace><namespace key="829" case="first-letter">Module talk</namespace><namespace key="1198" case="first-letter">Translations</namespace><namespace key="1199" case="first-letter">Translations talk</namespace><namespace key="2500" case="first-letter">VisualEditor</namespace><namespace key="2501" case="first-letter">VisualEditor talk</namespace></namespaces></siteinfo><page><title>Template:Mbox</title><ns>10</ns><id>45372</id><revision><id>634882</id><parentid>634876</parentid><timestamp>2013-01-25T22:40:38Z</timestamp><contributor><username>Kaldari</username><id>31661</id></contributor><comment>reverting self, problem was in ombox template</comment><text xml:space="preserve" bytes="707">{{
  {{namespace detect
  | demospace = {{{demospace|}}}
  | main      = ambox
  | talk      = tmbox
  | file      = imbox
  | category  = cmbox
  | other    = ombox
  }}
| type      = {{{type|}}}
| image      = {{{image|}}}
| imageright = {{{imageright|}}}
| class      = {{{class|}}}
| style      = {{{style|}}}
| textstyle  = {{{textstyle|}}}
| text      = {{{text}}}
| small      = {{{small|}}}
| smallimage = {{{smallimage|}}}
| smallimageright = {{{smallimageright|}}}
| smalltext  = {{{smalltext|}}}
| subst      = {{{subst|}}}
| date      = {{{date|}}}
| name      = {{{name|}}}
}}<noinclude>
{{documentation}}
<!-- Add categories and interwikis to the /doc subpage, not here! -->
</noinclude></text><sha1>40w6e1mdq2t695t9dv143e1rzq5pv1o</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation</title><ns>10</ns><id>20803</id><revision><id>688512</id><parentid>687083</parentid><timestamp>2013-05-11T17:18:34Z</timestamp><contributor><username>Wargo</username><id>25061</id></contributor><text xml:space="preserve" bytes="2079"><!--
  Automatically add {{template sandbox notice}} when on a /sandbox page.
-->{{#ifeq: {{SUBPAGENAME}} | sandbox
| <div style="clear: both;"></div>{{template sandbox notice|{{{livepage|}}}}}
}}<!--
  Start of green doc box.
-->{{documentation/start box2
| preload = {{{preload|}}}  <!--Allow custom preloads-->
| heading = {{{heading|¬}}}  <!--Empty but defined means no header-->
| heading-style = {{{heading-style|}}}
| content = {{{content|}}}
 
<!--Some namespaces must have the /doc, /sandbox and /testcases
    in talk space-->
| docspace = {{documentation/docspace}}
 
| 1 = {{{1|}}}  <!--Other docname, if fed-->
 
<!--The namespace is added in /start box2-->
| template page = {{documentation/template page}}
 
}}<!-- Start content --><!--
  Start load the /doc content:
  Note: The line breaks between this comment and the next line are necessary
  so  "=== Headings ===" at the start and end of docs are interpreted.
-->
{{#switch: {{#if:{{{content|}}}|1|0}}{{#if:{{{1|}}}|1|0}}{{#ifexist:{{{1|}}}|1|0}}{{#ifexist:{{documentation/docspace}}:{{documentation/template page}}/doc|1|0}}
| 1000 | 1001 | 1010 | 1011 | 1100 | 1101 | 1110
| 1111 = {{{content|}}}
| 0110 | 0111 = {{ {{{1}}} }}
| 0001 | 0011 = {{ {{documentation/docspace}}:{{documentation/template page}}/doc }}
| 0000 | 0100 | 0010 | 0101 =
}}
<!--
  End load the /doc content:
  Note: The line breaks between this comment and the previous line are necessary
  so  "=== Headings ===" at the start and end of docs are interpreted.
-->{{documentation/end box2
| preload = {{{preload|}}}  <!--Allow custom preloads-->
| content = {{{content|}}}
| link box = {{{link box|}}}  <!--So "link box=off" works-->
 
<!--Some namespaces must have the /doc, /sandbox and /testcases
    in talk space-->
| docspace = {{documentation/docspace}}
 
| 1 = {{{1|}}}  <!--Other docname, if fed-->
 
<!--The namespace is added in /end box2-->
| template page = {{documentation/template page}}
 
}}<!--
  End of green doc box
--><noinclude>
 
<!-- Add categories and interwikis to the /doc subpage, not here! -->
</noinclude></text><sha1>bvikrz5412m4gizkphh8ftj604e3kbf</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/docspace</title><ns>10</ns><id>93323</id><revision><id>631615</id><parentid>557279</parentid><timestamp>2013-01-20T15:55:26Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><minor/><comment>1 revision from [[:w:en:Template:Documentation/docspace]]: Requested by average_drifter in #mediawiki</comment><text xml:space="preserve" bytes="302">{{#switch: {{SUBJECTSPACE}}
  | {{ns:0}}
  | {{ns:File}}
  | {{ns:MediaWiki}}
  | {{ns:Category}} = {{TALKSPACE}}
  | #default = {{SUBJECTSPACE}}
}}<noinclude>
{{documentation|content=
This subtemplate of {{tl|documentation}} is used to determine the namespace of the documentation page.
}}</noinclude></text><sha1>7f8iymss9sr4v7f4t5pza1arwjogrv3</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/end box</title><ns>10</ns><id>93324</id><revision><id>631856</id><parentid>631623</parentid><timestamp>2013-01-20T16:24:41Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><text xml:space="preserve" bytes="4124"><noinclude><div></noinclude><div style="clear: both;"></div><!--So right or left floating items don't stick out of the doc box.-->
</div><!--End of green doc box--><!--
  Link box below for the doc meta-data:
-->{{#if:
  <!--Check if we should show the link box-->
  {{#ifeq: {{{link box|}}} | off
  |
  | {{{doc exist|yes}}}{{
    #switch: {{SUBJECTSPACE}}
    | {{ns:User}}
    | {{ns:Template}} = yes
    }}
  }}
 
| {{fmbox
  | id = documentation-meta-data
  | image = none
  | style = background-color: #ecfcf4;
  | textstyle = font-style: italic;
  | text =
    {{#if: {{{link box|}}}
    | {{{link box}}}  <!--Use custom link box content-->
    | {{#if: {{{doc exist|yes}}}
      | <!--/doc exists, link to it-->
        The above [[Wikipedia:Template documentation|documentation]] is [[Wikipedia:Transclusion|transcluded]] from [[{{{docpage|{{FULLPAGENAME}}/doc}}}]]. <small style="font-style: normal">([{{fullurl:{{{docpage|{{FULLPAGENAME}}/doc}}}|action=edit}} edit] &#124; [{{fullurl:{{{docpage|{{FULLPAGENAME}}/doc}}}|action=history}} history])</small> <br />
      }}<!--
        Add links to /sandbox and /testcases when appropriate:
  -->{{#switch: {{SUBJECTSPACE}}
      | {{ns:User}}
      | {{ns:Template}} =
        Editors can experiment in this template's {{
        #ifexist: {{{sandbox| {{FULLPAGENAME}}/sandbox }}}
        | [[{{{sandbox| {{FULLPAGENAME}}/sandbox }}}|sandbox]] <small style="font-style: normal">([{{fullurl: {{{sandbox| {{FULLPAGENAME}}/sandbox }}} | action=edit }} edit] <nowiki>|</nowiki> [{{fullurl:Special:ComparePages | page1={{urlencode:{{{template page|{{FULLPAGENAME}}}}}}}&page2={{urlencode:{{{sandbox|{{FULLPAGENAME}}/sandbox}}}}}}} diff])</small>
        | sandbox <small style="font-style: normal">([{{fullurl: {{{sandbox| {{FULLPAGENAME}}/sandbox }}} | action=edit&preload=Template:Documentation/preload-sandbox }} create] <nowiki>|</nowiki> [{{fullurl: {{{sandbox| {{FULLPAGENAME}}/sandbox }}} | action=edit&preload={{urlencode:{{{template page|{{FULLPAGENAME}}}}}}}&summary={{urlencode:Create sandbox version of [[{{{template page|{{FULLPAGENAME}}}}}]]}} }} mirror])</small>
        }} and {{
        #ifexist: {{{testcases| {{FULLPAGENAME}}/testcases }}}
        | [[{{{testcases| {{FULLPAGENAME}}/testcases }}}|testcases]] <small style="font-style: normal">([{{fullurl: {{{testcases| {{FULLPAGENAME}}/testcases }}} | action=edit }} edit])</small>
        | testcases <small style="font-style: normal">([{{fullurl: {{{testcases| {{FULLPAGENAME}}/testcases }}} | action=edit&preload=Template:Documentation/preload-testcases }} create])</small>
        }} pages. <br />
      }}<!--
        Show the cats and interwiki text, but not
        if "content" fed or "docname fed" since then it is
        unclear where to add the cats and interwikis.
  -->{{#if: {{{content|}}} {{{docname fed|}}}
      |
      | Please add categories and interwikis to the [[{{{docpage|{{FULLPAGENAME}}/doc}}}|/doc]] subpage.
      }}<!--
        Show the "Subpages" link:
  -->{{#switch: {{SUBJECTSPACE}}
      | {{ns:File}} =  <!--Don't show it-->
      | {{ns:Template}} = &#32;[[Special:PrefixIndex/{{{template page|{{FULLPAGENAME}}}}}/|Subpages of this template]].
      | #default = &#32;[[Special:PrefixIndex/{{{template page|{{FULLPAGENAME}}}}}/|Subpages of this page]].
      }}
    }}{{#ifexist:{{FULLPAGENAME}}/Print
    |<br />A [[Help:Books/for experts#Improving the book layout|print version]] of this template exists at [[/Print]]. If you make a change to this template, please update the print version as well.[[Category:Templates with print versions]]
    }}
  }}
}}<!--End link box--><!--
 
  Detect and report strange usage:
-->{{#if:
 
  <!--Check if {{documentation}} is transcluded
      on a /doc or /testcases page-->
  {{#switch: {{SUBPAGENAME}}
  | doc
  | testcases = strange
  }}
  <!--More checks can be added here, just return anything
      to make the surrounding if-case trigger-->
 
| <includeonly>[[Category:Wikipedia pages with strange ((documentation)) usage|{{main other|Main:}}{{FULLPAGENAME}}]]<!-- Sort on namespace --></includeonly>
 
}}</text><sha1>r3qht4u0hwps2mqnst3puyi8anb9dmz</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/end box2</title><ns>10</ns><id>124329</id><revision><id>688362</id><parentid>688359</parentid><timestamp>2013-05-11T09:36:55Z</timestamp><contributor><username>Shirayuki</username><id>472859</id></contributor><comment>Undo revision 688359 by [[Special:Contributions/Shirayuki|Shirayuki]] ([[User talk:Shirayuki|talk]])</comment><text xml:space="preserve" bytes="864">{{documentation/end box
| preload = {{{preload|}}}  <!--Allow custom preloads-->
| content = {{{content|}}}
| link box = {{{link box|}}}  <!--So "link box=off" works-->
 
| docpage =
  {{#if: {{{1|}}}
  | {{{1|}}}
  | {{{docspace|{{NAMESPACE}}}}}:{{{template page|{{PAGENAME}}}}}/doc
  }}
| doc exist =
  {{#ifexist:
    {{#if: {{{1|}}}
    | {{{1|}}}  <!--Other docname fed-->
    | {{{docspace|{{NAMESPACE}}}}}:{{{template page|{{PAGENAME}}}}}/doc
    }}
  | yes
  }}
| docname fed =
  {{#if: {{{1|}}}
  | yes
  }}
 
| sandbox =
  {{{docspace|{{NAMESPACE}}}}}:{{{template page|{{PAGENAME}}}}}/sandbox
| testcases =
  {{{docspace|{{NAMESPACE}}}}}:{{{template page|{{PAGENAME}}}}}/testcases
 
| template page =
  {{NAMESPACE}}:{{{template page|{{PAGENAME}}}}}
 
}}<noinclude>
 
<!-- Add categories and interwikis to the /doc subpage, not here! -->
</noinclude></text><sha1>sfe0ppdpxp1nwfzhpym4jwdtmgpph1p</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/start box</title><ns>10</ns><id>93326</id><revision><id>742132</id><parentid>742131</parentid><timestamp>2013-07-20T14:04:29Z</timestamp><contributor><ip>81.129.86.23</ip></contributor><text xml:space="preserve" bytes="2002"><!--
  Start of green doc box
--><div id="template-documentation" class="template-documentation iezoomfix" style="padding:1em;"><!--
  Add the heading at the top of the doc box:
-->{{#ifeq: {{{heading|¬}}} | <!--Defined but empty-->
| <!--"heading=", do nothing-->
| <div style="padding-bottom: 3px; border-bottom: 1px solid #aaa; margin-bottom: 1ex;"><span style="{{#if: {{{heading-style|}}}
  | {{{heading-style|}}}
  | {{#ifeq: {{SUBJECTSPACE}} | {{ns:Template}}
    | font-weight: bold; font-size: 125%
    | font-size: 150%
    }}
  }}">{{#switch: {{{heading|¬}}}
  | ¬ = 
    <!--"heading" not defined in this or previous level-->
    {{#switch: {{SUBJECTSPACE}}
    | {{ns:Template}} = [[File:Template-info.png|50px|link=|alt=Documentation icon]] Template documentation
    | {{ns:Module}} = [[File:Template-info.png|50px|link=|alt=Documentation icon]] Module documentation
    | {{ns:File}} = Summary
    | #default = Documentation
    }}
  | #default =
    <!--"heading" has data or is empty but defined-->
    {{{heading|}}}
  }}</span>{{
  #if: {{{content|}}}
  |
  | <!--Add the [view][edit][history][purge] or [create] links-->
    <span class="mw-editsection plainlinks" id="doc_editlinks" style="float:right; font-size:100%;">{{
    #if: {{{doc exist|yes}}}
    | &#91;[[{{{docpage|{{FULLPAGENAME}}/doc}}}|view]]&#93; [[{{fullurl:{{{docpage|{{FULLPAGENAME}}/doc}}}|action=edit}} edit]] [[{{fullurl:{{{docpage|{{FULLPAGENAME}}/doc}}}|action=history}} history]] [{{purge|purge}}]
    | <!--/doc doesn't exist-->
      [[{{fullurl:{{{docpage|{{FULLPAGENAME}}/doc}}}| action=edit&preload={{
        #if: {{{preload|}}}
        | {{urlencode:{{{preload}}}}}
        | {{#ifeq: {{SUBJECTSPACE}} | {{ns:File}}
          | Template:Documentation/preload-filespace
          | Template:Documentation/preload
          }} }} }} create]]
    }}</span>
  }}</div>
}}<noinclude><!-- close the div --></div>
 
<!-- Add categories and interwikis to the /doc subpage, not here! -->
</noinclude></text><sha1>linb792zr3zrp72qrhjkmqg1mz6uevr</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/start box2</title><ns>10</ns><id>93327</id><revision><id>631642</id><parentid>585737</parentid><timestamp>2013-01-20T15:55:27Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><minor/><comment>4 revisions from [[:w:en:Template:Documentation/start box2]]: Requested by average_drifter in #mediawiki</comment><text xml:space="preserve" bytes="625">{{documentation/start box
| preload = {{{preload|}}}  <!--Allow custom preloads-->
| heading = {{{heading|¬}}}  <!--Empty but defined means no header-->
| heading-style = {{{heading-style|}}}
| content = {{{content|}}}
 
| docpage =
  {{#if: {{{1|}}}
  | {{{1|}}}
  | {{{docspace|{{NAMESPACE}}}}}:{{{template page|{{PAGENAME}}}}}/doc
  }}
 
| doc exist =
  {{#ifexist:
    {{#if: {{{1|}}}
    | {{{1|}}}  <!--Other docname fed-->
    | {{{docspace|{{NAMESPACE}}}}}:{{{template page|{{PAGENAME}}}}}/doc
    }}
  | yes
  }}
 
}}<noinclude>
 
<!-- Add categories and interwikis to the /doc subpage, not here! -->
</noinclude></text><sha1>t5j6y918odlsx0iuls0qgi6wbl050q3</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/template page</title><ns>10</ns><id>93328</id><revision><id>631644</id><parentid>557289</parentid><timestamp>2013-01-20T15:55:27Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><minor/><comment>1 revision from [[:w:en:Template:Documentation/template page]]: Requested by average_drifter in #mediawiki</comment><text xml:space="preserve" bytes="232">{{#switch: {{SUBPAGENAME}}
| sandbox
| testcases = {{BASEPAGENAME}}
| #default = {{PAGENAME}}
}}<noinclude>{{documentation|content=
This subtemplate of {{tl|documentation}} is used to determine the template page name.
}}</noinclude></text><sha1>fenc3r6oe2sito28b1d8xgyo9gpq5uf</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation subpage</title><ns>10</ns><id>20806</id><revision><id>757428</id><parentid>715052</parentid><timestamp>2013-08-05T14:14:46Z</timestamp><contributor><username>IAlex</username><id>17961</id></contributor><minor/><comment>Reverted edits by [[Special:Contributions/90.219.4.40|90.219.4.40]] ([[User talk:90.219.4.40|talk]]) to last revision by [[User:Shirayuki|Shirayuki]]</comment><text xml:space="preserve" bytes="2616">{{#if:{{{Original-recipe|}}}{{{Orig|}}}
|<!-- reconstruction of original  Template:Template doc page pattern (now the redirected to " Template:Documentation subpage") template... ca mid-November 2007 -->
<table  class="messagebox" style="line-height:1.1em;" style=" background:#f9f9b7;">
<tr> <td rowspan="3" style="width:60px;text-align:center;" > [[Image:Edit-paste.svg|40px]]</td>
<td> This is the [[Wikipedia:Template documentation|template documentation]]<!--
--> page for [[{{NAMESPACE}}:{{{1|{{BASEPAGENAME}}}}}]].</td></tr>
<tr><td><small>This page may not be intended to be viewed directly. <br/
>Links using [[Help:Variable|variable]]s may appear broken; do not replace these with [[hardcoded]] page names or URLs.</small></td></tr>
</table>{{#if:{{{inhib|x}}}{{{inhibit|}}}|<!-- skip --->|<includeonly>[[Category:Template documentation|{{PAGENAME}}]]</includeonly>
}}<!-- Please retain the above original template...
 
There are templates formulated to [[WP:DPP]] that need this.
 
Of course, if you all want to start updating all the interwiki exported templates, go on making things more incompatible... queries to User:Fabartus.
 
--->
|<includeonly>{{#ifeq: {{lc:{{SUBPAGENAME}}}} | {{{override|doc}}}
  | <!-- doc page -->
</includeonly>{{
    #ifeq: {{{doc-notice|show}}} | show
    | {{mbox
      | type = notice
      | image = [[File:Edit-copy green.svg|40px]]
      | text =
'''This is a [[w:Wikipedia:Template documentation|documentation]] [[Help:Subpages|subpage]] for {{{1|[[:{{SUBJECTSPACE}}:{{BASEPAGENAME}}]]}}}'''
<small>(see that page for the {{#if:{{{text1|}}}
  |{{{text1}}}
  |{{#ifeq:{{SUBJECTSPACE}} | {{ns:User}}
    |{{lc:{{SUBJECTSPACE}}}} template
    |{{#if:{{SUBJECTSPACE}}
      |{{lc:{{SUBJECTSPACE}}}}
      |article}}
    }}
  }} itself)</small>.<br /><!--
-->It contains usage information, [[Help:Categories|categories]], [[w:Help:Interlanguage links|interlanguage links]] and other content that is not part of the original {{#if:{{{text2|}}}
  |{{{text2}}}
  |{{#if:{{{text1|}}}
    |{{{text1}}}
    |{{#ifeq:{{SUBJECTSPACE}} | {{ns:User}}
      |{{lc:{{SUBJECTSPACE}}}} template page
      |{{#if:{{SUBJECTSPACE}}
        |{{lc:{{SUBJECTSPACE}}}} page
        |article}}
    }}
  }}
}}.
      }}
    }}{{DEFAULTSORT:{{{defaultsort|{{PAGENAME}}}}}}}{{
    #if: {{{inhibit|}}}
    | <!-- skip -->
    | {{#ifeq:{{SUBJECTSPACE}}|Template|[[Category:Template documentation]]}}
  }}<includeonly>
| <!-- if not on a /doc subpage, do nothing -->
}}</includeonly><noinclude>
{{documentation}}
<!-- Add categories and interwikis to the /doc subpage, not here! -->
</noinclude>
}}</text><sha1>7a3si8r4k2z0aqxpbbxz1c0gmny5pb9</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Fmbox</title><ns>10</ns><id>37655</id><revision><id>558796</id><parentid>558707</parentid><timestamp>2012-07-05T06:11:26Z</timestamp><contributor><username>Krinkle</username><id>135822</id></contributor><comment>update from enwiki</comment><text xml:space="preserve" bytes="1344"><table {{#if:{{{id|}}}|id="{{{id|}}}"}} class="plainlinks fmbox
{{#switch:{{{type|}}}
| warning    = fmbox-warning
| editnotice = fmbox-editnotice
| system          <!-- system = default -->
| #default  = fmbox-system
}} {{{class|}}}" style="{{{style|}}}">
<tr>
{{#ifeq:{{{image|}}}|none
| <!-- No image. -->
| <td class="mbox-image">
  {{#if:{{{image|}}}
  | {{{image}}}
  | [[File:{{#switch:{{{type|}}}
    | warning    = Cmbox deletion.png
    | editnotice = Imbox notice.png
    | system          <!-- system = default -->
    | #default  = Imbox notice.png
    }}|40x40px|link=|alt=]]
  }}</td>
}}
<td class="mbox-text" style="{{{textstyle|}}}"> {{{text}}} </td>
{{#if:{{{imageright|}}}
| <td class="mbox-imageright"> {{{imageright}}} </td>
}}
</tr>
</table><!--
  Detect and report usage with faulty "type" parameter:
-->{{#switch:{{{type|}}}
|  <!-- No type fed, is also valid input -->
| warning
| editnotice
| system    =    <!-- Do nothing, valid "type" -->
| #default  = <div style="text-align: center;">This message box is using an invalid "type={{{type|}}}" parameter and needs fixing.</div>[[Category:Wikipedia message box parameter needs fixing|{{main other|Main:}}{{FULLPAGENAME}}]]<!-- Sort on namespace -->
}}<noinclude>
{{documentation}}
<!-- Add categories and interwikis to the /doc subpage, not here! -->
</noinclude></text><sha1>mrldgfpkjyqf89ukmq2vy7gh3ir2j7i</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Mbox/doc</title><ns>10</ns><id>45374</id><revision><id>659649</id><parentid>651771</parentid><timestamp>2013-03-14T09:07:42Z</timestamp><contributor><username>Krinkle</username><id>135822</id></contributor><text xml:space="preserve" bytes="14176">{{Documentation subpage}}
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
This is the {{tl|mbox}} or '''message box''' meta-template.
 
It is used to build ''message box'' templates such as {{tl|security risk}}. It offers several different colours, uses default images if no image parameter is given and it has some other features.
 
This meta-template uses the mbox CSS classes in [[MediaWiki:Common.css]]. The classes can also be used directly in a [[Help:Table|wikitable]] if special functionality is needed. See the [[w:Wikipedia:Ambox CSS classes|how-to guide]] for that.
 
=== Usage ===
 
Simple usage example:
 
<pre>
{{mbox | text = Some text.}}
</pre>
 
{{mbox | text = Some text. bla.}}
Complex example:
 
<pre>
{{mbox
| type      = style
| small      = left
| image      = [[File:Emblem-question-yellow.svg|40px|alt=Question mark]]
| smallimage = [[File:Emblem-question-yellow.svg|20px|alt=Question mark]]
| textstyle  = color: red; font-weight: bold; font-style: italic;
| text      = Text for a big box, for the top of articles.
| smalltext  = Text for the top of article sections.
}}
</pre>
 
{{mbox
| type      = style
| small      = left
| image      = [[File:Emblem-question-yellow.svg|40px|alt=Question mark]]
| smallimage = [[File:Emblem-question-yellow.svg|20px|alt=Question mark]]
| textstyle  = color: red; font-weight: bold; font-style: italic;
| text      = Text for a big box, for the top of articles.
| smalltext  = Text for the top of article sections.
}}
 
But you are not really supposed to use red bold italic text.
 
=== Message box types ===
 
The following examples use different '''type''' parameters but use no image parameters thus they use the default images for each type.
 
{{mbox
| type  = critical
| text  = type=<u>critical</u> – Urgent warnings, such as {{tlx|XSS alert}}.
}}
{{mbox
| type  = important
| text  = type=<u>important</u> – Serious problems, such as {{tl|delete}}.
}}
{{mbox
| type  = warning
| text  = type=<u>warning</u> – Other problems, such as {{tl|deprecated}}.
}}
{{mbox
| type  = caution
| text  = type=<u>caution</u> – Points of concern, but not so serious, such as {{tl|description missing}} and {{tl|inuse}}.
}}
{{mbox
| type  = notice
| text  = type=<u>notice</u> – Points of information, such as {{tl|oldupgradenotes}}.
}}
{{mbox
| type  =
| text  = type=<u>(blank)</u> – Default; general 'box'.
}}
{{mbox
| type  = move
| text  = type=<u>move</u> – Merge, split and transwiki proposals, such as {{tl|move}} and {{tl|MoveToCommons}}.
}}
{{mbox
| type  = protection
| text  = type=<u>protection</u> – Protection notices..
}}
{{mbox
| type  = license
| text  = type=<u>license</u> – License notices, such as {{tl|Free screenshot}}
}}
 
=== Other images ===
 
The default images shown above are mostly for convenience. In many cases it is more appropriate to use more specific images. These examples use the '''image''' parameter to specify an image other than the default images.
 
{{mbox
| type  = warning
| image = [[File:Unbalanced scales.svg|40px|link=|alt=]]
| text  = type = content <br> image = <nowiki>[[File:Unbalanced scales.svg|40px|link=|alt=]]</nowiki> <br> This image is often used for {{tl|POV}} and similar issues.
}}
{{mbox
| type  = notice
| image = [[File:Wikitext.svg|50px|link=|alt=]]
| text  = type = style <br> image = <nowiki>[[File:Wikitext.svg|50px|link=|alt=]]</nowiki> <br> This image is often used for {{tl|wikify}} etc.
}}
{{mbox
| type  = move
| image = [[File:Merge-arrows.svg|50px|link=|alt=]]
| text  = type = move <br> image = <nowiki>[[File:Merge-arrows.svg|50px|link=|alt=]]</nowiki> <br> This image is used for {{tl|merge}} etc.
}}
 
=== More examples ===
 
Some other parameter combinations.
 
{{mbox
| text  = No type and no image given ('''default''')
}}
{{mbox
| image = none
| text  = No type and '''image=none''' – No image is used and the '''text''' uses the whole message box area.
}}
 
{{mbox
| image = [[File:Gnome globe current event.svg|42px|alt=Clock over a larger globe]]
| imageright = [[File:Nuvola apps bookcase.svg|40px|alt=Three stacked books]]
| text  = image = <nowiki>[[File:Gnome globe current event.svg|42px|alt=Clock over a larger globe]]</nowiki> <br> imageright = <nowiki>[[File:Nuvola apps bookcase.svg|40px|alt=Three stacked books]]</nowiki>
}}
 
{{mbox
| image = [[File:Gnome globe current event.svg|42px|alt=Clock over a larger globe]]
| imageright = [[File:Shuttle.svg|20px|link=|alt=]]
| text  = '''This article or section documents a current [[spaceflight]].'''
<br>Content may change as the mission progresses.
}}
 
=== Parameters ===
 
List of all parameters:
 
<pre>
{{mbox
| type  = critical / serious / warning / notice / / move / protection
| image = none / [[File:...|40px|...]]
| imagewidth = width of image section / default is 52px
| imageright = [[File:...|40px|...]]
| imagerightwidth = width of right image section / default is 52px
| style = CSS values
| textstyle = CSS values
| text  = The message body text.
| small = {{{small|}}} / left
| smallimage = none / [[File:...|20px|...]]
| smallimageright = none / [[File:...|20px|...]]
| smalltext  = A shorter message body text.
}}
</pre>
 
'''type'''
:If no '''type''' parameter is given the template has a 'blank' style.
 
'''image'''
:'''No parameter''' = If no '''image''' parameter is given the template uses a default image. Which default image it uses depends on the '''type''' parameter.
:'''An image''' = Should be an image with usual wiki notation. Widths of 40px - 50px are usually about right. (Images over 52 pixels wide will cause padding problems, unless you also set imagewidth.)
:: Often an icon is [[Wikipedia:Alternative text for images #Purely decorative images|purely decorative]] in the W3C sense that it repeats the text. To improve [[Wikipedia:Accessibility|accessibility]], it is desirable to not have it be announced by [[screen reader]]s, as well as to avoid it linking to an irrelevant page. If (and only if) the image license allows this, it can be marked with "{{para|link}}{{para|alt}}". For example:
:::<code><nowiki>image = [[File:Unbalanced scales.svg|40px|link=|alt=]]</nowiki></code>
:: Conversely, an icon that does not use "{{para|link}}{{para|alt}}", and which therefore is announced to visually impaired readers, should use an "{{para|alt|<var>[[Wikipedia:Alternative text for images|alt text]]</var>}}" parameter that describes the icon. With no {{para|link}} parameter (using the default link), the alt text should describe the icon's visual appearance. For example:
:::<code><nowiki>image = [[File:Gnome globe current event.svg|40px|alt=Clock over a larger globe]]</nowiki></code>
:: With a nonempty "{{para|link|<var>Page</var>}}" the alt text should describe the icon's function. For example:
:::<code><nowiki>image = [[File:Purple question mark.svg|40px|link=Special:Random|alt=Random article]]</nowiki></code>
:: An icon whose license requires attribution may have alt text, but ''must keep the default link''. Although public domain images do not require a link, many licenses do require one. Please see ''[[Wikipedia:Alternative text for images #Purely decorative images|Purely decorative images]]'' for more information about licensing.
:'''none''' = Means that no image is used.
:<s>'''blank'''</s> = This parameter is now deprecated. If you see it in use, change it to "image=none".
 
'''imagewidth'''
:Optional [[w:Cascading Style Sheets|CSS]] value used to set width of image's div section.  Allowing you to use images wider than the default 52px wide.
:'''Example'''
:: <code>imagewidth=100px</code>
 
'''imageright'''
:'''No parameter''' = If no '''imageright''' parameter is given then no image is shown on the right side.
:'''An image''' = Should be an image with usual wiki notation. 40px - 50px width are usually about right depending on the image height to width ratio. (Images over 52 pixels width will cause padding problems, unless you also set imagerightwidth.) For example:
::<code><nowiki>imageright = [[File:Nuvola apps bookcase.png|40px|alt=Three stacked books]]</nowiki></code>
:'''Anything''' = Any other object that you want to show on the right side.
 
'''imagerightwidth'''
:Optional [[w:Cascading Style Sheets|CSS]] value used to set width of image's div section.  Allowing you to use images wider than the default 52px wide.
:'''Example'''
:: <code>imagerightwidth=100px</code>
 
'''style'''
:Optional [[Cascading Style Sheets|CSS]] values used by the entire message box table. Without quotation marks <code>" "</code> but with the ending semicolons <code>;</code>. For example:
::<code>style = margin-bottom: 0.5em;</code>
 
'''textstyle'''
:Optional [[Cascading Style Sheets|CSS]] values used by the text cell. For example:
::<code>textstyle = text-align: center;</code>
 
'''text'''
:The message body text.
 
==== The small parameters ====
 
The small article message boxes are meant for the top of sections. Normally they should only contain one or two lines of text.
 
'''small'''
:'''left''' = Makes it a smaller left aligned message box. This also makes the default images smaller. Note that any data fed to the '''smallimage''', '''smallimageright''' and '''smalltext''' parameters is only used if "small=left". To make it so your template also understands the small parameter you can use this code:
::<code><nowiki>small = {{{small|}}}</nowiki></code>
{{mbox
| small = left
| text = small = left
}}
{{mbox
| type = style
| small = left
| text = type = style <br> small = left
}}
 
'''smallimage'''
:'''No parameter''' = If no '''smallimage''' parameter is given then this template falls back to use the '''image''' parameter. If the '''image''' parameter also is empty then a small default image is used.
:'''An image''' = Should be an image with usual wiki notation. 20px width is usually about right for boxes with one line of text, while 25px width is usually about right for boxes with two lines of text. For example:
::<code><nowiki>smallimage = [[File:Gnome globe current event.svg|20px|alt=Clock over a larger globe]]</nowiki></code>
:'''none''' = Means that no image is used. This overrides any image fed to '''image''', when "small=left".
{{mbox
| small = left
| image      = [[File:Replacement filing cabinet.svg|50px|link=|alt=]]
| smallimage = [[File:Replacement filing cabinet.svg|25px|link=|alt=]]
| text =
small = left <br> image = <nowiki>[[File:Replacement filing cabinet.svg|50px|link=|alt=]]</nowiki> <br> smallimage = <nowiki>[[File:Replacement filing cabinet.svg|25px|link=|alt=]]</nowiki>
}}
 
'''smallimageright'''
:'''No parameter''' = If no '''smallimageright''' parameter is given then this template falls back to use the '''imageright''' parameter. If the '''imageright''' parameter also is empty then no image is shown on the right side.
:'''An image''' = Should be an image with usual wiki notation. 20px - 25px width is usually about right. For example:
::<code><nowiki>smallimageright = [[File:Nuvola apps bookcase.png|20px|alt=Three stacked books]]</nowiki></code>
:'''Anything''' = Any other object that you want to show on the right side.
:'''none''' = Means that no right side image is used. This overrides any image fed to '''imageright''', when "small=left".
{{mbox
| small = left
| imageright = [[File:Gnome globe current event.svg|50px|alt=Clock over a larger globe]]
| smallimageright = none
| text =
small = left <br> imageright = <nowiki>[[File:Gnome globe current event.svg|50px|alt=Clock over a larger globe]]</nowiki> <br> smallimageright = none
}}
 
'''smalltext'''
:A shorter version of the message body text. If no '''smalltext''' parameter is given then this template falls back to use the '''text''' parameter.
 
=== Technical details ===
 
If you need to use special characters in the text parameter then you need to escape them like this:
 
<pre>
{{mbox
| text  = <div>
Equal sign = and a start and end brace { } work fine as they are.
But here is a pipe &amp;#124; and two end braces &lt;nowiki>}}&lt;/nowiki>.
And now a pipe and end braces &lt;nowiki>|}}&lt;/nowiki>.
</div>
}}
</pre>
 
{{mbox
| text  = <div>
Equal sign = and a start and end brace { } work fine as they are.
Equal sign = and a start and end brace { } work fine as they are.
But here is a pipe &#124; and two end braces <nowiki>}}</nowiki>.
But here is a pipe &#124; and two end braces <nowiki>}}</nowiki>.
And now a pipe and end braces <nowiki>|}}</nowiki>.
And now a pipe and end braces <nowiki>|}}</nowiki>.
</div>
</div>
}}
The <code>&lt;div></code> tags that surround the text in the example above are usually not needed. But if the text contains line breaks then sometimes we get weird line spacing. This especially happens when using vertical dotted lists. Then use the div tags to fix that.
This template uses CSS classes in [[MediaWiki:Common.css]] for most of its looks, thus it is fully skinnable.
This template calls {{tl|mbox/core}} which holds most of the code for {{tl|mbox}}, while {{tl|mbox}} itself does parameter preprocessing.
Internally this meta-template uses HTML wikimarkup instead of wikimarkup for the table code. That is the usual way we make meta-templates since wikimarkup has several drawbacks. For instance it makes it harder to use [[m:Help:ParserFunctions|parser functions]] and some special characters in parameters.
The default images for this meta-template are in png format instead of svg format. The main reason is that some older web browsers have trouble with the transparent background that MediaWiki renders for svg images. The png images here have hand optimised transparent background colour so they look good in all browsers. Note that svg icons only look somewhat bad in the old browsers, thus such hand optimisation is only worth the trouble for very widely used icons.
For more technical details see the [[Template talk:mbox|talk page]] and the "See also" links below.
=== See also ===
{{mbox templates}}
Other pages:
* [[w:Template:Mbox]]
* [[w:Wikipedia:Ambox CSS classes]] – Describes how to use the ambox CSS classes directly in [[Help:Table|wikitable]]s and [[w:HTML element#Tables|HTML tables]].
* [[w:Wikipedia:Article message boxes]] – The style guideline for creating article message boxes.
* [[w:Wikipedia talk:Article message boxes]] – For discussion about these matters.
<includeonly>
[[Category:Mbox templates]]
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS -->
</includeonly></text><sha1>5cafb545bbublgg4mei08dvwxs9zay9</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Mbox templates</title><ns>10</ns><id>95150</id><revision><id>692773</id><parentid>565939</parentid><timestamp>2013-05-21T16:37:34Z</timestamp><contributor><ip>90.209.78.127</ip></contributor><text xml:space="preserve" bytes="268">{{nmbox
| image = [[File:Template-info.svg|50px]]
| header = [[Template:Mbox|Message box templates]]
| text = {{tl|ambox}} &bull; {{tl|asbox}} &bull; {{tl|cmbox}} &bull; {{tl|dmbox}} &bull; {{tl|fmbox}} &bull; {{tl|imbox}} &bull; {{tl|ombox}} &bull; {{tl|tmbox}}
}}</text><sha1>mm2hquqpmw1k85xftye00jkid2a0l4u</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Namespace detect</title><ns>10</ns><id>79689</id><revision><id>695915</id><parentid>497627</parentid><timestamp>2013-05-27T09:23:36Z</timestamp><contributor><ip>81.129.84.113</ip></contributor><text xml:space="preserve" bytes="1470">{{#switch:
  {{lc:              <!--Lower case the result-->
    <!--If no or empty "demospace" parameter then detect namespace-->
    {{#if:{{{demospace|}}}
    | {{{demospace}}}
    | {{#if:{{{page|}}}
      | <!--Detect the namespace in the "page" parameter-->
        {{#ifeq:{{NAMESPACE:{{{page}}} }}|{{TALKSPACE:{{{page}}} }}
        | talk
        | {{SUBJECTSPACE:{{{page}}} }}
        }}
      | <!--No "demospace" or "page" parameters, so detect actual namespace-->
        {{#ifeq:{{NAMESPACE}}|{{TALKSPACE}}
        | talk
        | {{SUBJECTSPACE}}
        }}
      }}
    }}
  }}
<!-- Only one of the lines below will be executed -->
<!-- Respecting empty parameters on purpose -->
| main        <!--"demospace=main" or {{SUBJECTSPACE}}={{ns:0}}=""-->
|          = {{{main| {{{other|}}} }}}
| talk      = {{{talk| {{{other|}}} }}}
| user      = {{{user| {{{other|}}} }}}
| project = {{{project| {{{other|}}} }}}
| file
| image    = {{{file| {{{image| {{{other|}}} }}} }}}
| mediawiki = {{{mediawiki| {{{other|}}} }}}
| template  = {{{template| {{{other|}}} }}}
| help      = {{{help| {{{other|}}} }}}
| category  = {{{category| {{{other|}}} }}}
| book      = {{{book| {{{other|}}} }}}
| extension      = {{{extension| {{{other|}}} }}}
| other
| #default  = {{{other|}}}  <!--"demospace=other" or a new namespace-->
}}<!--End switch--><noinclude>
{{documentation}}
<!-- Add categories and interwikis to the /doc subpage, not here! -->
</noinclude></text><sha1>qry2n28n1p12gxaxgu7gs1bkzywbpqv</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Nmbox</title><ns>10</ns><id>47495</id><revision><id>556782</id><parentid>328128</parentid><timestamp>2012-06-29T10:35:15Z</timestamp><contributor><username>Krinkle</username><id>135822</id></contributor><text xml:space="preserve" bytes="587"><table class="nmbox" style="border:1px solid #AAAAAA; border-collapse:collapse; clear:both; font-size:85%; margin: 0.5em 0;">
<tr style="background: #EEF3E2">
{{#if:{{{image|}}}{{{header|}}}
| <th class="mbox-image" style="white-space: nowrap; padding: 4px 1em; border-right: 1px solid #aaaaaa;">{{{image|}}} {{{header|}}}</th>
| <td class="mbox-empty-cell"></td>  <!-- No image. Cell with some width or padding necessary for text cell to have 100% width. -->
}}
<td class="mbox-text" style="background: #F6F9ED;">{{{text|}}}</td>
</tr></table><noinclude>
{{documentation}}
</noinclude></text><sha1>6k7jc6wiy6i7qy82dd4dw1xja6e8k5w</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Ombox</title><ns>10</ns><id>93344</id><revision><id>634878</id><parentid>634793</parentid><timestamp>2013-01-25T22:39:30Z</timestamp><contributor><username>Kaldari</username><id>31661</id></contributor><comment>reverting breakage</comment><text xml:space="preserve" bytes="723">{{#ifeq:{{{small|}}}|yes
| {{ombox/core
  | small = yes
  | type  = {{{type|}}}
  | image = {{#if:{{{smallimage|}}}| {{{smallimage}}} | {{{image|}}} }}
  | imageright = {{#if:{{{smallimageright|}}} | {{{smallimageright}}} | {{{imageright|}}} }}
  | class = {{{class|}}}
  | style = {{{style|}}}
  | textstyle = {{{textstyle|}}}
  | text  = {{#if:{{{smalltext|}}}| {{{smalltext}}} | {{{text}}} }}
  }}
| {{ombox/core
  | type  = {{{type|}}}
  | image = {{{image|}}}
  | imageright = {{{imageright|}}}
  | class = {{{class|}}}
  | style = {{{style|}}}
  | textstyle = {{{textstyle|}}}
  | text  = {{{text}}}
  }}
}}<noinclude>{{documentation}}<!-- Add categories and interwikis to the /doc subpage, not here! --></noinclude></text><sha1>p9vh00dqvq0u1q3950ueg6abd93dyrt</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Ombox/core</title><ns>10</ns><id>93345</id><revision><id>680423</id><parentid>680422</parentid><timestamp>2013-04-29T09:31:02Z</timestamp><contributor><username>Siebrand</username><id>5665</id></contributor><minor/><comment>Protected "[[Template:Ombox/core]]": Highly visible template ([Edit=Allow only autoconfirmed users] (indefinite) [Move=Allow only autoconfirmed users] (indefinite))</comment><text xml:space="preserve" bytes="2250"><table class="plainlinks ombox {{#ifeq:{{{small}}}|yes|mbox-small}}
{{#switch:{{{type|}}}
| critical  = mbox-critical
| important  = mbox-important
| caution  = mbox-caution
| warning  = mbox-warning
| license = mbox-license
| speedy    = ombox-speedy
| delete    = ombox-delete
| content    = ombox-content
| style      = ombox-style
| move      = ombox-move
| protection = ombox-protection
| notice          <!-- notice = default -->
| #default  = ombox-notice
}} {{{class|}}}" style="{{{style|}}}">
<tr>
{{#ifeq:{{{image|}}}|none
| <!-- No image. Cell with some width or padding necessary for text cell to have 100% width. --><td class="mbox-empty-cell"></td>
| <td class="mbox-image">
  {{#if:{{{image|}}}
  | {{{image}}}
  | [[Image:{{#switch:{{{type|}}}
    | critical  = Ambox warning pn.svg
    | important  = Ambox warning pn.svg
    | warning    = Ambox important.svg
    | caution    = Edit-clear.svg
    | license = Imbox_license.svg
    | speedy    = Imbox speedy deletion.png
    | delete    = Imbox deletion.png
    | content    = Imbox content.png
    | style      = Edit-clear.svg
    | move      = Imbox move.png
    | protection = Imbox protection.png
    | notice          <!-- notice = default -->
    | #default  = Imbox notice.png
    }} | {{#ifeq:{{{small|}}}|yes
    | 30x30px
    | 40x40px
    }}|link=|alt=]]
  }}</td>
}}
<td class="mbox-text" style="{{{textstyle|}}}"> {{{text}}} </td>
{{#if:{{{imageright|}}}
| {{#ifeq:{{{imageright|}}}|none
  | <!-- No image. -->
  | <td class="mbox-imageright"> {{{imageright}}} </td>
  }}
}}
</tr>
</table><!-- Detect and report usage with faulty "type" parameter:
-->{{#switch:{{{type|}}}
|  <!-- No type fed, is also valid input -->
| critical
| important
| warning
| caution
| license
| speedy
| delete
| content
| style
| move
| protection
| notice    =    <!-- Do nothing, valid "type" -->
| #default  = <div style="text-align: center;">This message box is using an invalid "type={{{type|}}}" parameter and needs fixing.</div>[[Category:Wikipedia message box parameter needs fixing|{{main other|Main:}}{{FULLPAGENAME}}]]<!-- Sort on namespace -->
}}<noinclude>
{{documentation}}
<!-- Add categories and interwikis to the /doc subpage, not here! -->
</noinclude></text><sha1>l3n9mp2c6ch14gekpe1oxxe8thp3xdb</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Para</title><ns>10</ns><id>40658</id><revision><id>557339</id><parentid>557338</parentid><timestamp>2012-06-30T23:27:18Z</timestamp><contributor><username>Reedy</username><id>28424</id></contributor><minor/><comment>1 revision from [[:w:en:Template:Para]]</comment><text xml:space="preserve" bytes="238"><code><nowiki>|</nowiki>{{#if:{{{1|}}}|<span style="white-space:nowrap;">{{{1}}}</span><nowiki>=</nowiki>|}}{{{2|}}}</code><noinclude>
{{Documentation}}
<!--Categories and interwikis go near the bottom of the /doc subpage.-->
</noinclude></text><sha1>3ve3qhqjaafu9wuy6em7y1fz49qyqfx</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Purge</title><ns>10</ns><id>31341</id><revision><id>405355</id><parentid>405354</parentid><timestamp>2011-05-24T01:39:17Z</timestamp><contributor><username>Peachey88</username><id>31302</id></contributor><minor/><comment>1 revision from [[:w:en:Template:Purge]]: update to en.wiki</comment><text xml:space="preserve" bytes="197"><span class="noprint plainlinks purgelink">[{{fullurl:{{{page|{{FULLPAGENAME}}}}}|action=purge}} <span title="Purge this page">{{{1|Purge}}}</span>]</span><noinclude>
{{documentation}}
</noinclude></text><sha1>830osaj62tvmlh6zq374ixtzbukxcih</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Tl</title><ns>10</ns><id>12644</id><redirect title="Template:Tlx"/><revision><id>760820</id><parentid>760712</parentid><timestamp>2013-08-10T10:29:27Z</timestamp><contributor><username>IAlex</username><id>17961</id></contributor><minor/><comment>Reverted edits by [[Special:Contributions/175.200.179.56|175.200.179.56]] ([[User talk:175.200.179.56|talk]]) to last revision by [[User:Varnent|Varnent]]</comment><text xml:space="preserve" bytes="25">#REDIRECT[[Template:Tlx]]</text><sha1>avv0qklcaxr8n5r45lcc2x17y9w78sc</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Tlx</title><ns>10</ns><id>20809</id><revision><id>557363</id><parentid>534113</parentid><timestamp>2012-06-30T23:27:22Z</timestamp><contributor><username>Reedy</username><id>28424</id></contributor><minor/><comment>1 revision from [[:w:en:Template:Tlx]]</comment><text xml:space="preserve" bytes="385"><includeonly><tt><nowiki>{{</nowiki>[[{{{SISTER|}}}{{ns:Template}}:{{{1|}}}|{{{1|}}}]]<!--
-->{{#if:{{{2|}}}|
&#124;{{{2}}}
}}<!--
-->{{#if:{{{3|}}}|
&#124;{{{3}}}
}}<!--
-->{{#if:{{{4|}}}|
&#124;{{{4}}}
}}<!--
-->{{#if:{{{5|}}}|
&#124;{{{5}}}
}}<!--
-->{{#if:{{{6|}}}|
&#124;<i>...</i>
}}<nowiki>}}</nowiki></tt></includeonly><noinclude>
== Doc ==
See [[m:Template:Tlx]].
</noinclude></text><sha1>0d6b5bkc7j2tegvw2yzm4b6iil98xqg</sha1>

Revision as of 14:58, 13 August 2013

<mediawiki xsi:schemaLocation="http://www.mediawiki.org/xml/export-0.8/ http://www.mediawiki.org/xml/export-0.8.xsd" version="0.8" xml:lang="en"><siteinfo><sitename>MediaWiki</sitename><base>http://www.mediawiki.org/wiki/MediaWiki</base><generator>MediaWiki 1.22wmf12</generator><case>first-letter</case><namespaces><namespace key="-2" case="first-letter">Media</namespace><namespace key="-1" case="first-letter">Special</namespace><namespace key="0" case="first-letter"/><namespace key="1" case="first-letter">Talk</namespace><namespace key="2" case="first-letter">User</namespace><namespace key="3" case="first-letter">User talk</namespace><namespace key="4" case="first-letter">Project</namespace><namespace key="5" case="first-letter">Project talk</namespace><namespace key="6" case="first-letter">File</namespace><namespace key="7" case="first-letter">File talk</namespace><namespace key="8" case="first-letter">MediaWiki</namespace><namespace key="9" case="first-letter">MediaWiki talk</namespace><namespace key="10" case="first-letter">Template</namespace><namespace key="11" case="first-letter">Template talk</namespace><namespace key="12" case="first-letter">Help</namespace><namespace key="13" case="first-letter">Help talk</namespace><namespace key="14" case="first-letter">Category</namespace><namespace key="15" case="first-letter">Category talk</namespace><namespace key="90" case="first-letter">Thread</namespace><namespace key="91" case="first-letter">Thread talk</namespace><namespace key="92" case="first-letter">Summary</namespace><namespace key="93" case="first-letter">Summary talk</namespace><namespace key="100" case="first-letter">Manual</namespace><namespace key="101" case="first-letter">Manual talk</namespace><namespace key="102" case="first-letter">Extension</namespace><namespace key="103" case="first-letter">Extension talk</namespace><namespace key="104" case="first-letter">API</namespace><namespace key="105" case="first-letter">API talk</namespace><namespace key="106" case="first-letter">Skin</namespace><namespace key="107" case="first-letter">Skin talk</namespace><namespace key="828" case="first-letter">Module</namespace><namespace key="829" case="first-letter">Module talk</namespace><namespace key="1198" case="first-letter">Translations</namespace><namespace key="1199" case="first-letter">Translations talk</namespace><namespace key="2500" case="first-letter">VisualEditor</namespace><namespace key="2501" case="first-letter">VisualEditor talk</namespace></namespaces></siteinfo><page><title>Template:Mbox</title><ns>10</ns><id>45372</id><revision><id>634882</id><parentid>634876</parentid><timestamp>2013-01-25T22:40:38Z</timestamp><contributor><username>Kaldari</username><id>31661</id></contributor><comment>reverting self, problem was in ombox template</comment><text xml:space="preserve" bytes="707">{{

 Template:Namespace detect

| type = | image = | imageright = | class = | style = | textstyle = | text = {{{text}}} | small = | smallimage = | smallimageright = | smalltext = | subst = | date = | name = }} Template:Documentation </text><sha1>40w6e1mdq2t695t9dv143e1rzq5pv1o</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation</title><ns>10</ns><id>20803</id><revision><id>688512</id><parentid>687083</parentid><timestamp>2013-05-11T17:18:34Z</timestamp><contributor><username>Wargo</username><id>25061</id></contributor><text xml:space="preserve" bytes="2079">{{#ifeq: Mbox | sandbox

|

Template:Template sandbox notice

}}Template:Documentation/start box2 {{#switch: {{#if:|1|0}}{{#if:|1|0}}{{#ifexist:|1|0}}{{#ifexist:Template:Documentation/docspace:Template:Documentation/template page/doc|1|0}} | 1000 | 1001 | 1010 | 1011 | 1100 | 1101 | 1110 | 1111 = | 0110 | 0111 = {{ {{{1}}} }} | 0001 | 0011 = {{ Template:Documentation/docspace:Template:Documentation/template page/doc }} | 0000 | 0100 | 0010 | 0101 = }} Template:Documentation/end box2

</text><sha1>bvikrz5412m4gizkphh8ftj604e3kbf</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/docspace</title><ns>10</ns><id>93323</id><revision><id>631615</id><parentid>557279</parentid><timestamp>2013-01-20T15:55:26Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><minor/><comment>1 revision from w:en:Template:Documentation/docspace: Requested by average_drifter in #mediawiki</comment><text xml:space="preserve" bytes="302">{{#switch: Template

 | 
 | File
 | MediaWiki
 | Category = Template talk
 | #default = Template

}}

Template:Documentation</text><sha1>7f8iymss9sr4v7f4t5pza1arwjogrv3</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/end box</title><ns>10</ns><id>93324</id><revision><id>631856</id><parentid>631623</parentid><timestamp>2013-01-20T16:24:41Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><text xml:space="preserve" bytes="4124">

{{#if:

 {{#ifeq:  | off
 |
 | yes{{
   #switch: Template
   | User
   | Template = yes
   }}
 }}

| Template:Fmbox }}{{#if:

 {{#switch: Mbox
 | doc
 | testcases = strange
 }}

|

}}</text><sha1>r3qht4u0hwps2mqnst3puyi8anb9dmz</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/end box2</title><ns>10</ns><id>124329</id><revision><id>688362</id><parentid>688359</parentid><timestamp>2013-05-11T09:36:55Z</timestamp><contributor><username>Shirayuki</username><id>472859</id></contributor><comment>Undo revision 688359 by Shirayuki (talk)</comment><text xml:space="preserve" bytes="864">Template:Documentation/end box

</text><sha1>sfe0ppdpxp1nwfzhpym4jwdtmgpph1p</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/start box</title><ns>10</ns><id>93326</id><revision><id>742132</id><parentid>742131</parentid><timestamp>2013-07-20T14:04:29Z</timestamp><contributor><ip>81.129.86.23</ip></contributor><text xml:space="preserve" bytes="2002">

{{#ifeq: ¬ |

|

|
{{#switch: ¬
 | ¬ =   
   {{#switch: Template 
   | Template = File:Template-info.png Template documentation
   | Template:Ns:Module = File:Template-info.png Module documentation
   | File = Summary
   | #default = Documentation
   }}
 | #default = 
   
 }}{{
 #if: 
 | 
 | 
   {{
   #if: yes
   | [view] [edit] [history] [[[:Template:Purge]]] 
   | 
     [#if:  _        | %7B%7B%7Bpreload%7D%7D%7D_        | {{#ifeq: Template | File_          | Template:Documentation/preload-filespace_          | Template:Documentation/preload_          }} }} create]
   }}
}}
}}

</text><sha1>linb792zr3zrp72qrhjkmqg1mz6uevr</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/start box2</title><ns>10</ns><id>93327</id><revision><id>631642</id><parentid>585737</parentid><timestamp>2013-01-20T15:55:27Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><minor/><comment>4 revisions from w:en:Template:Documentation/start box2: Requested by average_drifter in #mediawiki</comment><text xml:space="preserve" bytes="625">Template:Documentation/start box

</text><sha1>t5j6y918odlsx0iuls0qgi6wbl050q3</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/template page</title><ns>10</ns><id>93328</id><revision><id>631644</id><parentid>557289</parentid><timestamp>2013-01-20T15:55:27Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><minor/><comment>1 revision from w:en:Template:Documentation/template page: Requested by average_drifter in #mediawiki</comment><text xml:space="preserve" bytes="232">{{#switch: Mbox | sandbox | testcases = Mbox | #default = Mbox }}Template:Documentation</text><sha1>fenc3r6oe2sito28b1d8xgyo9gpq5uf</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation subpage</title><ns>10</ns><id>20806</id><revision><id>757428</id><parentid>715052</parentid><timestamp>2013-08-05T14:14:46Z</timestamp><contributor><username>IAlex</username><id>17961</id></contributor><minor/><comment>Reverted edits by 90.219.4.40 (talk) to last revision by Shirayuki</comment><text xml:space="preserve" bytes="2616">{{#if: |

File:Edit-paste.svg This is the template documentation page for Template:Mbox.
This page may not be intended to be viewed directly.
Links using variables may appear broken; do not replace these with hardcoded page names or URLs.

{{#if:x||

}} |{{

   #ifeq: show | show
   | <mediawiki xsi:schemaLocation="http://www.mediawiki.org/xml/export-0.8/ http://www.mediawiki.org/xml/export-0.8.xsd" version="0.8" xml:lang="en"><siteinfo><sitename>MediaWiki</sitename><base>http://www.mediawiki.org/wiki/MediaWiki</base><generator>MediaWiki 1.22wmf12</generator><case>first-letter</case><namespaces><namespace key="-2" case="first-letter">Media</namespace><namespace key="-1" case="first-letter">Special</namespace><namespace key="0" case="first-letter"/><namespace key="1" case="first-letter">Talk</namespace><namespace key="2" case="first-letter">User</namespace><namespace key="3" case="first-letter">User talk</namespace><namespace key="4" case="first-letter">Project</namespace><namespace key="5" case="first-letter">Project talk</namespace><namespace key="6" case="first-letter">File</namespace><namespace key="7" case="first-letter">File talk</namespace><namespace key="8" case="first-letter">MediaWiki</namespace><namespace key="9" case="first-letter">MediaWiki talk</namespace><namespace key="10" case="first-letter">Template</namespace><namespace key="11" case="first-letter">Template talk</namespace><namespace key="12" case="first-letter">Help</namespace><namespace key="13" case="first-letter">Help talk</namespace><namespace key="14" case="first-letter">Category</namespace><namespace key="15" case="first-letter">Category talk</namespace><namespace key="90" case="first-letter">Thread</namespace><namespace key="91" case="first-letter">Thread talk</namespace><namespace key="92" case="first-letter">Summary</namespace><namespace key="93" case="first-letter">Summary talk</namespace><namespace key="100" case="first-letter">Manual</namespace><namespace key="101" case="first-letter">Manual talk</namespace><namespace key="102" case="first-letter">Extension</namespace><namespace key="103" case="first-letter">Extension talk</namespace><namespace key="104" case="first-letter">API</namespace><namespace key="105" case="first-letter">API talk</namespace><namespace key="106" case="first-letter">Skin</namespace><namespace key="107" case="first-letter">Skin talk</namespace><namespace key="828" case="first-letter">Module</namespace><namespace key="829" case="first-letter">Module talk</namespace><namespace key="1198" case="first-letter">Translations</namespace><namespace key="1199" case="first-letter">Translations talk</namespace><namespace key="2500" case="first-letter">VisualEditor</namespace><namespace key="2501" case="first-letter">VisualEditor talk</namespace></namespaces></siteinfo><page><title>Template:Mbox</title><ns>10</ns><id>45372</id><revision><id>634882</id><parentid>634876</parentid><timestamp>2013-01-25T22:40:38Z</timestamp><contributor><username>Kaldari</username><id>31661</id></contributor><comment>reverting self, problem was in ombox template</comment><text xml:space="preserve" bytes="707">{{
 Template:Namespace detect

| type = notice | image = File:Edit-copy green.svg | imageright = | class = | style = | textstyle = | text = This is a documentation subpage for Template:Mbox (see that page for the {{#if:

 |{{{text1}}}
 |{{#ifeq:Template | User
   |template template
   |{{#if:Template
     |template
     |article}}
   }}
 }} itself).
It contains usage information, categories, interlanguage links and other content that is not part of the original {{#if: |{{{text2}}} |{{#if: |{{{text1}}} |{{#ifeq:Template | User |template template page |{{#if:Template |template page |article}} }} }}

}}. | small = | smallimage = | smallimageright = | smalltext = | subst = | date = | name = }}</text><sha1>40w6e1mdq2t695t9dv143e1rzq5pv1o</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation</title><ns>10</ns><id>20803</id><revision><id>688512</id><parentid>687083</parentid><timestamp>2013-05-11T17:18:34Z</timestamp><contributor><username>Wargo</username><id>25061</id></contributor><text xml:space="preserve" bytes="2079">{{#ifeq: Mbox | sandbox

|

Template:Template sandbox notice

}}Template:Documentation/start box2 {{#switch: {{#if:|1|0}}{{#if:|1|0}}{{#ifexist:|1|0}}{{#ifexist:Template:Documentation/docspace:Template:Documentation/template page/doc|1|0}} | 1000 | 1001 | 1010 | 1011 | 1100 | 1101 | 1110 | 1111 = | 0110 | 0111 = {{ {{{1}}} }} | 0001 | 0011 = {{ Template:Documentation/docspace:Template:Documentation/template page/doc }} | 0000 | 0100 | 0010 | 0101 = }} Template:Documentation/end box2</text><sha1>bvikrz5412m4gizkphh8ftj604e3kbf</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/docspace</title><ns>10</ns><id>93323</id><revision><id>631615</id><parentid>557279</parentid><timestamp>2013-01-20T15:55:26Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><minor/><comment>1 revision from w:en:Template:Documentation/docspace: Requested by average_drifter in #mediawiki</comment><text xml:space="preserve" bytes="302">{{#switch: Template

 | 
 | File
 | MediaWiki
 | Category = Template talk
 | #default = Template

}}</text><sha1>7f8iymss9sr4v7f4t5pza1arwjogrv3</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/end box</title><ns>10</ns><id>93324</id><revision><id>631856</id><parentid>631623</parentid><timestamp>2013-01-20T16:24:41Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><text xml:space="preserve" bytes="4124">

{{#if:

 {{#ifeq:  | off
 |
 | yes{{
   #switch: Template
   | User
   | Template = yes
   }}
 }}

| Template:Fmbox }}{{#if:

 {{#switch: Mbox
 | doc
 | testcases = strange
 }}

| [[Category:Wikipedia pages with strange ((documentation)) usage|Template:Main otherTemplate:Mbox]]

}}</text><sha1>r3qht4u0hwps2mqnst3puyi8anb9dmz</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/end box2</title><ns>10</ns><id>124329</id><revision><id>688362</id><parentid>688359</parentid><timestamp>2013-05-11T09:36:55Z</timestamp><contributor><username>Shirayuki</username><id>472859</id></contributor><comment>Undo revision 688359 by Shirayuki (talk)</comment><text xml:space="preserve" bytes="864">Template:Documentation/end box</text><sha1>sfe0ppdpxp1nwfzhpym4jwdtmgpph1p</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/start box</title><ns>10</ns><id>93326</id><revision><id>742132</id><parentid>742131</parentid><timestamp>2013-07-20T14:04:29Z</timestamp><contributor><ip>81.129.86.23</ip></contributor><text xml:space="preserve" bytes="2002">

{{#ifeq: ¬ |

|

|
{{#switch: ¬
 | ¬ =   
   {{#switch: Template 
   | Template = File:Template-info.png Template documentation
   | Template:Ns:Module = File:Template-info.png Module documentation
   | File = Summary
   | #default = Documentation
   }}
 | #default = 
   
 }}{{
 #if: 
 | 
 | 
   {{
   #if: yes
   | [view] [edit] [history] [[[:Template:Purge]]] 
   | 
     [#if:  _        | %7B%7B%7Bpreload%7D%7D%7D_        | {{#ifeq: Template | File_          | Template:Documentation/preload-filespace_          | Template:Documentation/preload_          }} }} create]
   }}
}}

}}</text><sha1>linb792zr3zrp72qrhjkmqg1mz6uevr</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/start box2</title><ns>10</ns><id>93327</id><revision><id>631642</id><parentid>585737</parentid><timestamp>2013-01-20T15:55:27Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><minor/><comment>4 revisions from w:en:Template:Documentation/start box2: Requested by average_drifter in #mediawiki</comment><text xml:space="preserve" bytes="625">Template:Documentation/start box</text><sha1>t5j6y918odlsx0iuls0qgi6wbl050q3</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/template page</title><ns>10</ns><id>93328</id><revision><id>631644</id><parentid>557289</parentid><timestamp>2013-01-20T15:55:27Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><minor/><comment>1 revision from w:en:Template:Documentation/template page: Requested by average_drifter in #mediawiki</comment><text xml:space="preserve" bytes="232">{{#switch: Mbox | sandbox | testcases = Mbox | #default = Mbox }}</text><sha1>fenc3r6oe2sito28b1d8xgyo9gpq5uf</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation subpage</title><ns>10</ns><id>20806</id><revision><id>757428</id><parentid>715052</parentid><timestamp>2013-08-05T14:14:46Z</timestamp><contributor><username>IAlex</username><id>17961</id></contributor><minor/><comment>Reverted edits by 90.219.4.40 (talk) to last revision by Shirayuki</comment><text xml:space="preserve" bytes="2616">{{#if: |

File:Edit-paste.svg This is the template documentation page for Template:Mbox.
This page may not be intended to be viewed directly.
Links using variables may appear broken; do not replace these with hardcoded page names or URLs.
{{#if:x||

}} |{{#ifeq: mbox | doc

 | 

{{

   #ifeq: show | show
   | Template loop detected: Template:Mbox
   }}{{
   #if: 
   | 
   | {{#ifeq:Template|Template|}}
 }}

| }}

}}</text><sha1>7a3si8r4k2z0aqxpbbxz1c0gmny5pb9</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Fmbox</title><ns>10</ns><id>37655</id><revision><id>558796</id><parentid>558707</parentid><timestamp>2012-07-05T06:11:26Z</timestamp><contributor><username>Krinkle</username><id>135822</id></contributor><comment>update from enwiki</comment><text xml:space="preserve" bytes="1344"> {{#ifeq:File:Edit-copy green.svg|none | | }} {{#if: |

}}

{{#switch:notice

| | warning | editnotice | system =

| #default =
This message box is using an invalid "type=notice" parameter and needs fixing.
[[Category:Wikipedia message box parameter needs fixing|Template:Main otherTemplate:Mbox]]

}}</text><sha1>mrldgfpkjyqf89ukmq2vy7gh3ir2j7i</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Mbox/doc</title><ns>10</ns><id>45374</id><revision><id>659649</id><parentid>651771</parentid><timestamp>2013-03-14T09:07:42Z</timestamp><contributor><username>Krinkle</username><id>135822</id></contributor><text xml:space="preserve" bytes="14176">Template:Documentation subpage This is the Template:Tl or message box meta-template.

It is used to build message box templates such as Template:Tl. It offers several different colours, uses default images if no image parameter is given and it has some other features.

This meta-template uses the mbox CSS classes in MediaWiki:Common.css. The classes can also be used directly in a wikitable if special functionality is needed. See the how-to guide for that.

Usage

Simple usage example:

{{mbox | text = Some text.}}

Template loop detected: Template:Mbox Complex example:

{{mbox
| type       = style
| small      = left
| image      = [[File:Emblem-question-yellow.svg|40px|alt=Question mark]]
| smallimage = [[File:Emblem-question-yellow.svg|20px|alt=Question mark]]
| textstyle  = color: red; font-weight: bold; font-style: italic;
| text       = Text for a big box, for the top of articles.
| smalltext  = Text for the top of article sections.
}}

Template loop detected: Template:Mbox

But you are not really supposed to use red bold italic text.

Message box types

The following examples use different type parameters but use no image parameters thus they use the default images for each type.

Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox

Other images

The default images shown above are mostly for convenience. In many cases it is more appropriate to use more specific images. These examples use the image parameter to specify an image other than the default images.

Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox

More examples

Some other parameter combinations.

Template loop detected: Template:Mbox Template loop detected: Template:Mbox

Template loop detected: Template:Mbox

Template loop detected: Template:Mbox

Parameters

List of all parameters:

{{mbox
| type  = critical / serious / warning / notice / / move / protection
| image = none / [[File:...|40px|...]]
| imagewidth = width of image section / default is 52px
| imageright = [[File:...|40px|...]]
| imagerightwidth = width of right image section / default is 52px
| style = CSS values
| textstyle = CSS values
| text  = The message body text.
| small = {{{small|}}} / left
| smallimage = none / [[File:...|20px|...]]
| smallimageright = none / [[File:...|20px|...]]
| smalltext  = A shorter message body text.
}}

type

If no type parameter is given the template has a 'blank' style.

image

No parameter = If no image parameter is given the template uses a default image. Which default image it uses depends on the type parameter.
An image = Should be an image with usual wiki notation. Widths of 40px - 50px are usually about right. (Images over 52 pixels wide will cause padding problems, unless you also set imagewidth.)
Often an icon is purely decorative in the W3C sense that it repeats the text. To improve accessibility, it is desirable to not have it be announced by screen readers, as well as to avoid it linking to an irrelevant page. If (and only if) the image license allows this, it can be marked with "Template:ParaTemplate:Para". For example:
image = [[File:Unbalanced scales.svg|40px|link=|alt=]]
Conversely, an icon that does not use "Template:ParaTemplate:Para", and which therefore is announced to visually impaired readers, should use an "Template:Para" parameter that describes the icon. With no Template:Para parameter (using the default link), the alt text should describe the icon's visual appearance. For example:
image = [[File:Gnome globe current event.svg|40px|alt=Clock over a larger globe]]
With a nonempty "Template:Para" the alt text should describe the icon's function. For example:
image = [[File:Purple question mark.svg|40px|link=Special:Random|alt=Random article]]
An icon whose license requires attribution may have alt text, but must keep the default link. Although public domain images do not require a link, many licenses do require one. Please see Purely decorative images for more information about licensing.
none = Means that no image is used.
blank = This parameter is now deprecated. If you see it in use, change it to "image=none".

imagewidth

Optional CSS value used to set width of image's div section. Allowing you to use images wider than the default 52px wide.
Example
imagewidth=100px

imageright

No parameter = If no imageright parameter is given then no image is shown on the right side.
An image = Should be an image with usual wiki notation. 40px - 50px width are usually about right depending on the image height to width ratio. (Images over 52 pixels width will cause padding problems, unless you also set imagerightwidth.) For example:
imageright = [[File:Nuvola apps bookcase.png|40px|alt=Three stacked books]]
Anything = Any other object that you want to show on the right side.

imagerightwidth

Optional CSS value used to set width of image's div section. Allowing you to use images wider than the default 52px wide.
Example
imagerightwidth=100px

style

Optional CSS values used by the entire message box table. Without quotation marks " " but with the ending semicolons ;. For example:
style = margin-bottom: 0.5em;

textstyle

Optional CSS values used by the text cell. For example:
textstyle = text-align: center;

text

The message body text.

The small parameters

The small article message boxes are meant for the top of sections. Normally they should only contain one or two lines of text.

small

left = Makes it a smaller left aligned message box. This also makes the default images smaller. Note that any data fed to the smallimage, smallimageright and smalltext parameters is only used if "small=left". To make it so your template also understands the small parameter you can use this code:
small = {{{small|}}}

Template loop detected: Template:Mbox Template loop detected: Template:Mbox

smallimage

No parameter = If no smallimage parameter is given then this template falls back to use the image parameter. If the image parameter also is empty then a small default image is used.
An image = Should be an image with usual wiki notation. 20px width is usually about right for boxes with one line of text, while 25px width is usually about right for boxes with two lines of text. For example:
smallimage = [[File:Gnome globe current event.svg|20px|alt=Clock over a larger globe]]
none = Means that no image is used. This overrides any image fed to image, when "small=left".

Template loop detected: Template:Mbox

smallimageright

No parameter = If no smallimageright parameter is given then this template falls back to use the imageright parameter. If the imageright parameter also is empty then no image is shown on the right side.
An image = Should be an image with usual wiki notation. 20px - 25px width is usually about right. For example:
smallimageright = [[File:Nuvola apps bookcase.png|20px|alt=Three stacked books]]
Anything = Any other object that you want to show on the right side.
none = Means that no right side image is used. This overrides any image fed to imageright, when "small=left".

Template loop detected: Template:Mbox

smalltext

A shorter version of the message body text. If no smalltext parameter is given then this template falls back to use the text parameter.

Technical details

If you need to use special characters in the text parameter then you need to escape them like this:

{{mbox
| text  = <div>
Equal sign = and a start and end brace { } work fine as they are.
But here is a pipe &#124; and two end braces <nowiki>}}</nowiki>.
And now a pipe and end braces <nowiki>|}}</nowiki>.
</div>
}}

Template loop detected: Template:Mbox

The <div> tags that surround the text in the example above are usually not needed. But if the text contains line breaks then sometimes we get weird line spacing. This especially happens when using vertical dotted lists. Then use the div tags to fix that.

This template uses CSS classes in MediaWiki:Common.css for most of its looks, thus it is fully skinnable.

This template calls Template:Tl which holds most of the code for Template:Tl, while Template:Tl itself does parameter preprocessing.

Internally this meta-template uses HTML wikimarkup instead of wikimarkup for the table code. That is the usual way we make meta-templates since wikimarkup has several drawbacks. For instance it makes it harder to use parser functions and some special characters in parameters.

The default images for this meta-template are in png format instead of svg format. The main reason is that some older web browsers have trouble with the transparent background that MediaWiki renders for svg images. The png images here have hand optimised transparent background colour so they look good in all browsers. Note that svg icons only look somewhat bad in the old browsers, thus such hand optimisation is only worth the trouble for very widely used icons.

For more technical details see the talk page and the "See also" links below.

See also

Template:Mbox templates Other pages:

</text><sha1>5cafb545bbublgg4mei08dvwxs9zay9</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Mbox templates</title><ns>10</ns><id>95150</id><revision><id>692773</id><parentid>565939</parentid><timestamp>2013-05-21T16:37:34Z</timestamp><contributor><ip>90.209.78.127</ip></contributor><text xml:space="preserve" bytes="268">Template:Nmbox</text><sha1>mm2hquqpmw1k85xftye00jkid2a0l4u</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Namespace detect</title><ns>10</ns><id>79689</id><revision><id>695915</id><parentid>497627</parentid><timestamp>2013-05-27T09:23:36Z</timestamp><contributor><ip>81.129.84.113</ip></contributor><text xml:space="preserve" bytes="1470">{{#switch:

 {{#if: 
   | {{{demospace}}}
   | {{#if: 
     | 
       {{#ifeq:|
       | talk
       |  
       }}
     | 
       {{#ifeq:template|template talk
       | talk
       | template 
       }}
     }}
   }}

| main | = | talk = | user = | project = | file | image = File:Edit-copy green.svg | mediawiki = | template = | help = | category = | book = | extension = | other | #default =

}}</text><sha1>qry2n28n1p12gxaxgu7gs1bkzywbpqv</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Nmbox</title><ns>10</ns><id>47495</id><revision><id>556782</id><parentid>328128</parentid><timestamp>2012-06-29T10:35:15Z</timestamp><contributor><username>Krinkle</username><id>135822</id></contributor><text xml:space="preserve" bytes="587"> {{#if:File:Edit-copy green.svg | |

}}

File:Edit-copy green.svg This is a documentation subpage for Template:Mbox

(see that page for the {{#if:

 |{{{text1}}}
 |{{#ifeq:Template | User
   |template template
   |{{#if:Template
     |template
     |article}}
   }}
 }} itself).
It contains usage information, categories, interlanguage links and other content that is not part of the original {{#if: |{{{text2}}} |{{#if: |{{{text1}}} |{{#ifeq:Template | User |template template page |{{#if:Template |template page |article}} }} }}
}}.
</text><sha1>6k7jc6wiy6i7qy82dd4dw1xja6e8k5w</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Ombox</title><ns>10</ns><id>93344</id><revision><id>634878</id><parentid>634793</parentid><timestamp>2013-01-25T22:39:30Z</timestamp><contributor><username>Kaldari</username><id>31661</id></contributor><comment>reverting breakage</comment><text xml:space="preserve" bytes="723">{{#ifeq:|yes

| Template:Ombox/core | Template:Ombox/core

}}</text><sha1>p9vh00dqvq0u1q3950ueg6abd93dyrt</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Ombox/core</title><ns>10</ns><id>93345</id><revision><id>680423</id><parentid>680422</parentid><timestamp>2013-04-29T09:31:02Z</timestamp><contributor><username>Siebrand</username><id>5665</id></contributor><minor/><comment>Protected "Template:Ombox/core": Highly visible template ([Edit=Allow only autoconfirmed users] (indefinite) [Move=Allow only autoconfirmed users] (indefinite))</comment><text xml:space="preserve" bytes="2250"> {{#ifeq:File:Edit-copy green.svg|none | | }} {{#if: | {{#ifeq:|none | |
 }}

}}

{{#switch:notice

| | critical | important | warning | caution | license | speedy | delete | content | style | move | protection | notice =

| #default =
This message box is using an invalid "type=notice" parameter and needs fixing.
[[Category:Wikipedia message box parameter needs fixing|Template:Main otherTemplate:Mbox]]

}}</text><sha1>l3n9mp2c6ch14gekpe1oxxe8thp3xdb</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Para</title><ns>10</ns><id>40658</id><revision><id>557339</id><parentid>557338</parentid><timestamp>2012-06-30T23:27:18Z</timestamp><contributor><username>Reedy</username><id>28424</id></contributor><minor/><comment>1 revision from w:en:Template:Para</comment><text xml:space="preserve" bytes="238">|{{#if:|{{{1}}}=|}}</text><sha1>3ve3qhqjaafu9wuy6em7y1fz49qyqfx</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Purge</title><ns>10</ns><id>31341</id><revision><id>405355</id><parentid>405354</parentid><timestamp>2011-05-24T01:39:17Z</timestamp><contributor><username>Peachey88</username><id>31302</id></contributor><minor/><comment>1 revision from w:en:Template:Purge: update to en.wiki</comment><text xml:space="preserve" bytes="197">Purge</text><sha1>830osaj62tvmlh6zq374ixtzbukxcih</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Tl</title><ns>10</ns><id>12644</id><redirect title="Template:Tlx"/><revision><id>760820</id><parentid>760712</parentid><timestamp>2013-08-10T10:29:27Z</timestamp><contributor><username>IAlex</username><id>17961</id></contributor><minor/><comment>Reverted edits by 175.200.179.56 (talk) to last revision by Varnent</comment><text xml:space="preserve" bytes="25">#REDIRECTTemplate:Tlx</text><sha1>avv0qklcaxr8n5r45lcc2x17y9w78sc</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Tlx</title><ns>10</ns><id>20809</id><revision><id>557363</id><parentid>534113</parentid><timestamp>2012-06-30T23:27:22Z</timestamp><contributor><username>Reedy</username><id>28424</id></contributor><minor/><comment>1 revision from w:en:Template:Tlx</comment><text xml:space="preserve" bytes="385">{{[[Template:|]]{{#if:| |{{{2}}} }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}}</text><sha1>0d6b5bkc7j2tegvw2yzm4b6iil98xqg</sha1>

   }}{{
   #if: 
   | 
   | {{#ifeq:Template|Template|}}
 }}

Template:Documentation

}}</text><sha1>7a3si8r4k2z0aqxpbbxz1c0gmny5pb9</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Fmbox</title><ns>10</ns><id>37655</id><revision><id>558796</id><parentid>558707</parentid><timestamp>2012-07-05T06:11:26Z</timestamp><contributor><username>Krinkle</username><id>135822</id></contributor><comment>update from enwiki</comment><text xml:space="preserve" bytes="1344"> {{#ifeq:|none | | }}

{{#if:

|

}}

{{#switch:

| | warning | editnotice | system =

| #default =
This message box is using an invalid "type=" parameter and needs fixing.
[[Category:Wikipedia message box parameter needs fixing|Template:Main otherTemplate:Mbox]]

}} Template:Documentation </text><sha1>mrldgfpkjyqf89ukmq2vy7gh3ir2j7i</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Mbox/doc</title><ns>10</ns><id>45374</id><revision><id>659649</id><parentid>651771</parentid><timestamp>2013-03-14T09:07:42Z</timestamp><contributor><username>Krinkle</username><id>135822</id></contributor><text xml:space="preserve" bytes="14176">Template:Documentation subpage This is the Template:Tl or message box meta-template.

It is used to build message box templates such as Template:Tl. It offers several different colours, uses default images if no image parameter is given and it has some other features.

This meta-template uses the mbox CSS classes in MediaWiki:Common.css. The classes can also be used directly in a wikitable if special functionality is needed. See the how-to guide for that.

Usage

Simple usage example:

{{mbox | text = Some text.}}

<mediawiki xsi:schemaLocation="http://www.mediawiki.org/xml/export-0.8/ http://www.mediawiki.org/xml/export-0.8.xsd" version="0.8" xml:lang="en"><siteinfo><sitename>MediaWiki</sitename><base>http://www.mediawiki.org/wiki/MediaWiki</base><generator>MediaWiki 1.22wmf12</generator><case>first-letter</case><namespaces><namespace key="-2" case="first-letter">Media</namespace><namespace key="-1" case="first-letter">Special</namespace><namespace key="0" case="first-letter"/><namespace key="1" case="first-letter">Talk</namespace><namespace key="2" case="first-letter">User</namespace><namespace key="3" case="first-letter">User talk</namespace><namespace key="4" case="first-letter">Project</namespace><namespace key="5" case="first-letter">Project talk</namespace><namespace key="6" case="first-letter">File</namespace><namespace key="7" case="first-letter">File talk</namespace><namespace key="8" case="first-letter">MediaWiki</namespace><namespace key="9" case="first-letter">MediaWiki talk</namespace><namespace key="10" case="first-letter">Template</namespace><namespace key="11" case="first-letter">Template talk</namespace><namespace key="12" case="first-letter">Help</namespace><namespace key="13" case="first-letter">Help talk</namespace><namespace key="14" case="first-letter">Category</namespace><namespace key="15" case="first-letter">Category talk</namespace><namespace key="90" case="first-letter">Thread</namespace><namespace key="91" case="first-letter">Thread talk</namespace><namespace key="92" case="first-letter">Summary</namespace><namespace key="93" case="first-letter">Summary talk</namespace><namespace key="100" case="first-letter">Manual</namespace><namespace key="101" case="first-letter">Manual talk</namespace><namespace key="102" case="first-letter">Extension</namespace><namespace key="103" case="first-letter">Extension talk</namespace><namespace key="104" case="first-letter">API</namespace><namespace key="105" case="first-letter">API talk</namespace><namespace key="106" case="first-letter">Skin</namespace><namespace key="107" case="first-letter">Skin talk</namespace><namespace key="828" case="first-letter">Module</namespace><namespace key="829" case="first-letter">Module talk</namespace><namespace key="1198" case="first-letter">Translations</namespace><namespace key="1199" case="first-letter">Translations talk</namespace><namespace key="2500" case="first-letter">VisualEditor</namespace><namespace key="2501" case="first-letter">VisualEditor talk</namespace></namespaces></siteinfo><page><title>Template:Mbox</title><ns>10</ns><id>45372</id><revision><id>634882</id><parentid>634876</parentid><timestamp>2013-01-25T22:40:38Z</timestamp><contributor><username>Kaldari</username><id>31661</id></contributor><comment>reverting self, problem was in ombox template</comment><text xml:space="preserve" bytes="707">{{

 Template:Namespace detect

| type = | image = | imageright = | class = | style = | textstyle = | text = Some text. bla. | small = | smallimage = | smallimageright = | smalltext = | subst = | date = | name = }}</text><sha1>40w6e1mdq2t695t9dv143e1rzq5pv1o</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation</title><ns>10</ns><id>20803</id><revision><id>688512</id><parentid>687083</parentid><timestamp>2013-05-11T17:18:34Z</timestamp><contributor><username>Wargo</username><id>25061</id></contributor><text xml:space="preserve" bytes="2079">{{#ifeq: Mbox | sandbox

|
Template:Template sandbox notice

}}Template:Documentation/start box2 {{#switch: {{#if:|1|0}}{{#if:|1|0}}{{#ifexist:|1|0}}{{#ifexist:Template:Documentation/docspace:Template:Documentation/template page/doc|1|0}} | 1000 | 1001 | 1010 | 1011 | 1100 | 1101 | 1110 | 1111 = | 0110 | 0111 = {{ {{{1}}} }} | 0001 | 0011 = {{ Template:Documentation/docspace:Template:Documentation/template page/doc }} | 0000 | 0100 | 0010 | 0101 = }} Template:Documentation/end box2</text><sha1>bvikrz5412m4gizkphh8ftj604e3kbf</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/docspace</title><ns>10</ns><id>93323</id><revision><id>631615</id><parentid>557279</parentid><timestamp>2013-01-20T15:55:26Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><minor/><comment>1 revision from w:en:Template:Documentation/docspace: Requested by average_drifter in #mediawiki</comment><text xml:space="preserve" bytes="302">{{#switch: Template

 | 
 | File
 | MediaWiki
 | Category = Template talk
 | #default = Template
}}</text><sha1>7f8iymss9sr4v7f4t5pza1arwjogrv3</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/end box</title><ns>10</ns><id>93324</id><revision><id>631856</id><parentid>631623</parentid><timestamp>2013-01-20T16:24:41Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><text xml:space="preserve" bytes="4124">

{{#if:

 {{#ifeq:  | off
 |
 | yes{{
   #switch: Template
   | User
   | Template = yes
   }}
 }}

| Template:Fmbox }}{{#if:

 {{#switch: Mbox
 | doc
 | testcases = strange
 }}

| [[Category:Wikipedia pages with strange ((documentation)) usage|Template:Main otherTemplate:Mbox]]

}}</text><sha1>r3qht4u0hwps2mqnst3puyi8anb9dmz</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/end box2</title><ns>10</ns><id>124329</id><revision><id>688362</id><parentid>688359</parentid><timestamp>2013-05-11T09:36:55Z</timestamp><contributor><username>Shirayuki</username><id>472859</id></contributor><comment>Undo revision 688359 by Shirayuki (talk)</comment><text xml:space="preserve" bytes="864">Template:Documentation/end box</text><sha1>sfe0ppdpxp1nwfzhpym4jwdtmgpph1p</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/start box</title><ns>10</ns><id>93326</id><revision><id>742132</id><parentid>742131</parentid><timestamp>2013-07-20T14:04:29Z</timestamp><contributor><ip>81.129.86.23</ip></contributor><text xml:space="preserve" bytes="2002">

{{#ifeq: ¬ |

|

|
{{#switch: ¬
 | ¬ =   
   {{#switch: Template 
   | Template = File:Template-info.png Template documentation
   | Template:Ns:Module = File:Template-info.png Module documentation
   | File = Summary
   | #default = Documentation
   }}
 | #default = 
   
 }}{{
 #if: 
 | 
 | 
   {{
   #if: yes
   | [view] [edit] [history] [[[:Template:Purge]]] 
   | 
     [#if:  _        | %7B%7B%7Bpreload%7D%7D%7D_        | {{#ifeq: Template | File_          | Template:Documentation/preload-filespace_          | Template:Documentation/preload_          }} }} create]
   }}
}}

}}</text><sha1>linb792zr3zrp72qrhjkmqg1mz6uevr</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/start box2</title><ns>10</ns><id>93327</id><revision><id>631642</id><parentid>585737</parentid><timestamp>2013-01-20T15:55:27Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><minor/><comment>4 revisions from w:en:Template:Documentation/start box2: Requested by average_drifter in #mediawiki</comment><text xml:space="preserve" bytes="625">Template:Documentation/start box</text><sha1>t5j6y918odlsx0iuls0qgi6wbl050q3</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/template page</title><ns>10</ns><id>93328</id><revision><id>631644</id><parentid>557289</parentid><timestamp>2013-01-20T15:55:27Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><minor/><comment>1 revision from w:en:Template:Documentation/template page: Requested by average_drifter in #mediawiki</comment><text xml:space="preserve" bytes="232">{{#switch: Mbox | sandbox | testcases = Mbox | #default = Mbox }}</text><sha1>fenc3r6oe2sito28b1d8xgyo9gpq5uf</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation subpage</title><ns>10</ns><id>20806</id><revision><id>757428</id><parentid>715052</parentid><timestamp>2013-08-05T14:14:46Z</timestamp><contributor><username>IAlex</username><id>17961</id></contributor><minor/><comment>Reverted edits by 90.219.4.40 (talk) to last revision by Shirayuki</comment><text xml:space="preserve" bytes="2616">{{#if: |

File:Edit-paste.svg This is the template documentation page for Template:Mbox.
This page may not be intended to be viewed directly.
Links using variables may appear broken; do not replace these with hardcoded page names or URLs.
{{#if:x||

}} |{{#ifeq: mbox | doc

 | 

{{

   #ifeq: show | show
   | Template loop detected: Template:Mbox
   }}{{
   #if: 
   | 
   | {{#ifeq:Template|Template|}}
 }}

| }}

}}</text><sha1>7a3si8r4k2z0aqxpbbxz1c0gmny5pb9</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Fmbox</title><ns>10</ns><id>37655</id><revision><id>558796</id><parentid>558707</parentid><timestamp>2012-07-05T06:11:26Z</timestamp><contributor><username>Krinkle</username><id>135822</id></contributor><comment>update from enwiki</comment><text xml:space="preserve" bytes="1344"> {{#ifeq:|none | | }}

{{#if:

|

}}

{{#switch:

| | warning | editnotice | system =

| #default =
This message box is using an invalid "type=" parameter and needs fixing.
[[Category:Wikipedia message box parameter needs fixing|Template:Main otherTemplate:Mbox]]

}}</text><sha1>mrldgfpkjyqf89ukmq2vy7gh3ir2j7i</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Mbox/doc</title><ns>10</ns><id>45374</id><revision><id>659649</id><parentid>651771</parentid><timestamp>2013-03-14T09:07:42Z</timestamp><contributor><username>Krinkle</username><id>135822</id></contributor><text xml:space="preserve" bytes="14176">Template:Documentation subpage This is the Template:Tl or message box meta-template.

It is used to build message box templates such as Template:Tl. It offers several different colours, uses default images if no image parameter is given and it has some other features.

This meta-template uses the mbox CSS classes in MediaWiki:Common.css. The classes can also be used directly in a wikitable if special functionality is needed. See the how-to guide for that.

Usage

Simple usage example:

{{mbox | text = Some text.}}

Template loop detected: Template:Mbox Complex example:

{{mbox
| type       = style
| small      = left
| image      = [[File:Emblem-question-yellow.svg|40px|alt=Question mark]]
| smallimage = [[File:Emblem-question-yellow.svg|20px|alt=Question mark]]
| textstyle  = color: red; font-weight: bold; font-style: italic;
| text       = Text for a big box, for the top of articles.
| smalltext  = Text for the top of article sections.
}}

Template loop detected: Template:Mbox

But you are not really supposed to use red bold italic text.

Message box types

The following examples use different type parameters but use no image parameters thus they use the default images for each type.

Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox

Other images

The default images shown above are mostly for convenience. In many cases it is more appropriate to use more specific images. These examples use the image parameter to specify an image other than the default images.

Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox

More examples

Some other parameter combinations.

Template loop detected: Template:Mbox Template loop detected: Template:Mbox

Template loop detected: Template:Mbox

Template loop detected: Template:Mbox

Parameters

List of all parameters:

{{mbox
| type  = critical / serious / warning / notice / / move / protection
| image = none / [[File:...|40px|...]]
| imagewidth = width of image section / default is 52px
| imageright = [[File:...|40px|...]]
| imagerightwidth = width of right image section / default is 52px
| style = CSS values
| textstyle = CSS values
| text  = The message body text.
| small = {{{small|}}} / left
| smallimage = none / [[File:...|20px|...]]
| smallimageright = none / [[File:...|20px|...]]
| smalltext  = A shorter message body text.
}}

type

If no type parameter is given the template has a 'blank' style.

image

No parameter = If no image parameter is given the template uses a default image. Which default image it uses depends on the type parameter.
An image = Should be an image with usual wiki notation. Widths of 40px - 50px are usually about right. (Images over 52 pixels wide will cause padding problems, unless you also set imagewidth.)
Often an icon is purely decorative in the W3C sense that it repeats the text. To improve accessibility, it is desirable to not have it be announced by screen readers, as well as to avoid it linking to an irrelevant page. If (and only if) the image license allows this, it can be marked with "Template:ParaTemplate:Para". For example:
image = [[File:Unbalanced scales.svg|40px|link=|alt=]]
Conversely, an icon that does not use "Template:ParaTemplate:Para", and which therefore is announced to visually impaired readers, should use an "Template:Para" parameter that describes the icon. With no Template:Para parameter (using the default link), the alt text should describe the icon's visual appearance. For example:
image = [[File:Gnome globe current event.svg|40px|alt=Clock over a larger globe]]
With a nonempty "Template:Para" the alt text should describe the icon's function. For example:
image = [[File:Purple question mark.svg|40px|link=Special:Random|alt=Random article]]
An icon whose license requires attribution may have alt text, but must keep the default link. Although public domain images do not require a link, many licenses do require one. Please see Purely decorative images for more information about licensing.
none = Means that no image is used.
blank = This parameter is now deprecated. If you see it in use, change it to "image=none".

imagewidth

Optional CSS value used to set width of image's div section. Allowing you to use images wider than the default 52px wide.
Example
imagewidth=100px

imageright

No parameter = If no imageright parameter is given then no image is shown on the right side.
An image = Should be an image with usual wiki notation. 40px - 50px width are usually about right depending on the image height to width ratio. (Images over 52 pixels width will cause padding problems, unless you also set imagerightwidth.) For example:
imageright = [[File:Nuvola apps bookcase.png|40px|alt=Three stacked books]]
Anything = Any other object that you want to show on the right side.

imagerightwidth

Optional CSS value used to set width of image's div section. Allowing you to use images wider than the default 52px wide.
Example
imagerightwidth=100px

style

Optional CSS values used by the entire message box table. Without quotation marks " " but with the ending semicolons ;. For example:
style = margin-bottom: 0.5em;

textstyle

Optional CSS values used by the text cell. For example:
textstyle = text-align: center;

text

The message body text.

The small parameters

The small article message boxes are meant for the top of sections. Normally they should only contain one or two lines of text.

small

left = Makes it a smaller left aligned message box. This also makes the default images smaller. Note that any data fed to the smallimage, smallimageright and smalltext parameters is only used if "small=left". To make it so your template also understands the small parameter you can use this code:
small = {{{small|}}}

Template loop detected: Template:Mbox Template loop detected: Template:Mbox

smallimage

No parameter = If no smallimage parameter is given then this template falls back to use the image parameter. If the image parameter also is empty then a small default image is used.
An image = Should be an image with usual wiki notation. 20px width is usually about right for boxes with one line of text, while 25px width is usually about right for boxes with two lines of text. For example:
smallimage = [[File:Gnome globe current event.svg|20px|alt=Clock over a larger globe]]
none = Means that no image is used. This overrides any image fed to image, when "small=left".

Template loop detected: Template:Mbox

smallimageright

No parameter = If no smallimageright parameter is given then this template falls back to use the imageright parameter. If the imageright parameter also is empty then no image is shown on the right side.
An image = Should be an image with usual wiki notation. 20px - 25px width is usually about right. For example:
smallimageright = [[File:Nuvola apps bookcase.png|20px|alt=Three stacked books]]
Anything = Any other object that you want to show on the right side.
none = Means that no right side image is used. This overrides any image fed to imageright, when "small=left".

Template loop detected: Template:Mbox

smalltext

A shorter version of the message body text. If no smalltext parameter is given then this template falls back to use the text parameter.

Technical details

If you need to use special characters in the text parameter then you need to escape them like this:

{{mbox
| text  = <div>
Equal sign = and a start and end brace { } work fine as they are.
But here is a pipe &#124; and two end braces <nowiki>}}</nowiki>.
And now a pipe and end braces <nowiki>|}}</nowiki>.
</div>
}}

Template loop detected: Template:Mbox

The <div> tags that surround the text in the example above are usually not needed. But if the text contains line breaks then sometimes we get weird line spacing. This especially happens when using vertical dotted lists. Then use the div tags to fix that.

This template uses CSS classes in MediaWiki:Common.css for most of its looks, thus it is fully skinnable.

This template calls Template:Tl which holds most of the code for Template:Tl, while Template:Tl itself does parameter preprocessing.

Internally this meta-template uses HTML wikimarkup instead of wikimarkup for the table code. That is the usual way we make meta-templates since wikimarkup has several drawbacks. For instance it makes it harder to use parser functions and some special characters in parameters.

The default images for this meta-template are in png format instead of svg format. The main reason is that some older web browsers have trouble with the transparent background that MediaWiki renders for svg images. The png images here have hand optimised transparent background colour so they look good in all browsers. Note that svg icons only look somewhat bad in the old browsers, thus such hand optimisation is only worth the trouble for very widely used icons.

For more technical details see the talk page and the "See also" links below.

See also

Template:Mbox templates Other pages:

</text><sha1>5cafb545bbublgg4mei08dvwxs9zay9</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Mbox templates</title><ns>10</ns><id>95150</id><revision><id>692773</id><parentid>565939</parentid><timestamp>2013-05-21T16:37:34Z</timestamp><contributor><ip>90.209.78.127</ip></contributor><text xml:space="preserve" bytes="268">Template:Nmbox</text><sha1>mm2hquqpmw1k85xftye00jkid2a0l4u</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Namespace detect</title><ns>10</ns><id>79689</id><revision><id>695915</id><parentid>497627</parentid><timestamp>2013-05-27T09:23:36Z</timestamp><contributor><ip>81.129.84.113</ip></contributor><text xml:space="preserve" bytes="1470">{{#switch:

 {{#if: 
   | {{{demospace}}}
   | {{#if: 
     | 
       {{#ifeq:|
       | talk
       |  
       }}
     | 
       {{#ifeq:template|template talk
       | talk
       | template 
       }}
     }}
   }}

| main | = | talk = | user = | project = | file | image = | mediawiki = | template = | help = | category = | book = | extension = | other | #default =

}}</text><sha1>qry2n28n1p12gxaxgu7gs1bkzywbpqv</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Nmbox</title><ns>10</ns><id>47495</id><revision><id>556782</id><parentid>328128</parentid><timestamp>2012-06-29T10:35:15Z</timestamp><contributor><username>Krinkle</username><id>135822</id></contributor><text xml:space="preserve" bytes="587"> {{#if: | |

}}

Some text. bla.
</text><sha1>6k7jc6wiy6i7qy82dd4dw1xja6e8k5w</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Ombox</title><ns>10</ns><id>93344</id><revision><id>634878</id><parentid>634793</parentid><timestamp>2013-01-25T22:39:30Z</timestamp><contributor><username>Kaldari</username><id>31661</id></contributor><comment>reverting breakage</comment><text xml:space="preserve" bytes="723">{{#ifeq:|yes

| Template:Ombox/core | Template:Ombox/core

}}</text><sha1>p9vh00dqvq0u1q3950ueg6abd93dyrt</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Ombox/core</title><ns>10</ns><id>93345</id><revision><id>680423</id><parentid>680422</parentid><timestamp>2013-04-29T09:31:02Z</timestamp><contributor><username>Siebrand</username><id>5665</id></contributor><minor/><comment>Protected "Template:Ombox/core": Highly visible template ([Edit=Allow only autoconfirmed users] (indefinite) [Move=Allow only autoconfirmed users] (indefinite))</comment><text xml:space="preserve" bytes="2250"> {{#ifeq:|none | | }}

{{#if: | {{#ifeq:|none

 | 
|
 }}

}}

{{#switch:

| | critical | important | warning | caution | license | speedy | delete | content | style | move | protection | notice =

| #default =
This message box is using an invalid "type=" parameter and needs fixing.
[[Category:Wikipedia message box parameter needs fixing|Template:Main otherTemplate:Mbox]]

}}</text><sha1>l3n9mp2c6ch14gekpe1oxxe8thp3xdb</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Para</title><ns>10</ns><id>40658</id><revision><id>557339</id><parentid>557338</parentid><timestamp>2012-06-30T23:27:18Z</timestamp><contributor><username>Reedy</username><id>28424</id></contributor><minor/><comment>1 revision from w:en:Template:Para</comment><text xml:space="preserve" bytes="238">|{{#if:|{{{1}}}=|}}</text><sha1>3ve3qhqjaafu9wuy6em7y1fz49qyqfx</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Purge</title><ns>10</ns><id>31341</id><revision><id>405355</id><parentid>405354</parentid><timestamp>2011-05-24T01:39:17Z</timestamp><contributor><username>Peachey88</username><id>31302</id></contributor><minor/><comment>1 revision from w:en:Template:Purge: update to en.wiki</comment><text xml:space="preserve" bytes="197">Purge</text><sha1>830osaj62tvmlh6zq374ixtzbukxcih</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Tl</title><ns>10</ns><id>12644</id><redirect title="Template:Tlx"/><revision><id>760820</id><parentid>760712</parentid><timestamp>2013-08-10T10:29:27Z</timestamp><contributor><username>IAlex</username><id>17961</id></contributor><minor/><comment>Reverted edits by 175.200.179.56 (talk) to last revision by Varnent</comment><text xml:space="preserve" bytes="25">#REDIRECTTemplate:Tlx</text><sha1>avv0qklcaxr8n5r45lcc2x17y9w78sc</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Tlx</title><ns>10</ns><id>20809</id><revision><id>557363</id><parentid>534113</parentid><timestamp>2012-06-30T23:27:22Z</timestamp><contributor><username>Reedy</username><id>28424</id></contributor><minor/><comment>1 revision from w:en:Template:Tlx</comment><text xml:space="preserve" bytes="385">{{[[Template:|]]{{#if:| |{{{2}}} }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}}</text><sha1>0d6b5bkc7j2tegvw2yzm4b6iil98xqg</sha1> Complex example:

{{mbox
| type       = style
| small      = left
| image      = [[File:Emblem-question-yellow.svg|40px|alt=Question mark]]
| smallimage = [[File:Emblem-question-yellow.svg|20px|alt=Question mark]]
| textstyle  = color: red; font-weight: bold; font-style: italic;
| text       = Text for a big box, for the top of articles.
| smalltext  = Text for the top of article sections.
}}

<mediawiki xsi:schemaLocation="http://www.mediawiki.org/xml/export-0.8/ http://www.mediawiki.org/xml/export-0.8.xsd" version="0.8" xml:lang="en"><siteinfo><sitename>MediaWiki</sitename><base>http://www.mediawiki.org/wiki/MediaWiki</base><generator>MediaWiki 1.22wmf12</generator><case>first-letter</case><namespaces><namespace key="-2" case="first-letter">Media</namespace><namespace key="-1" case="first-letter">Special</namespace><namespace key="0" case="first-letter"/><namespace key="1" case="first-letter">Talk</namespace><namespace key="2" case="first-letter">User</namespace><namespace key="3" case="first-letter">User talk</namespace><namespace key="4" case="first-letter">Project</namespace><namespace key="5" case="first-letter">Project talk</namespace><namespace key="6" case="first-letter">File</namespace><namespace key="7" case="first-letter">File talk</namespace><namespace key="8" case="first-letter">MediaWiki</namespace><namespace key="9" case="first-letter">MediaWiki talk</namespace><namespace key="10" case="first-letter">Template</namespace><namespace key="11" case="first-letter">Template talk</namespace><namespace key="12" case="first-letter">Help</namespace><namespace key="13" case="first-letter">Help talk</namespace><namespace key="14" case="first-letter">Category</namespace><namespace key="15" case="first-letter">Category talk</namespace><namespace key="90" case="first-letter">Thread</namespace><namespace key="91" case="first-letter">Thread talk</namespace><namespace key="92" case="first-letter">Summary</namespace><namespace key="93" case="first-letter">Summary talk</namespace><namespace key="100" case="first-letter">Manual</namespace><namespace key="101" case="first-letter">Manual talk</namespace><namespace key="102" case="first-letter">Extension</namespace><namespace key="103" case="first-letter">Extension talk</namespace><namespace key="104" case="first-letter">API</namespace><namespace key="105" case="first-letter">API talk</namespace><namespace key="106" case="first-letter">Skin</namespace><namespace key="107" case="first-letter">Skin talk</namespace><namespace key="828" case="first-letter">Module</namespace><namespace key="829" case="first-letter">Module talk</namespace><namespace key="1198" case="first-letter">Translations</namespace><namespace key="1199" case="first-letter">Translations talk</namespace><namespace key="2500" case="first-letter">VisualEditor</namespace><namespace key="2501" case="first-letter">VisualEditor talk</namespace></namespaces></siteinfo><page><title>Template:Mbox</title><ns>10</ns><id>45372</id><revision><id>634882</id><parentid>634876</parentid><timestamp>2013-01-25T22:40:38Z</timestamp><contributor><username>Kaldari</username><id>31661</id></contributor><comment>reverting self, problem was in ombox template</comment><text xml:space="preserve" bytes="707">{{

 Template:Namespace detect

| type = style | image = File:Emblem-question-yellow.svg | imageright = | class = | style = | textstyle = color: red; font-weight: bold; font-style: italic; | text = Text for a big box, for the top of articles. | small = left | smallimage = File:Emblem-question-yellow.svg | smallimageright = | smalltext = Text for the top of article sections. | subst = | date = | name = }}</text><sha1>40w6e1mdq2t695t9dv143e1rzq5pv1o</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation</title><ns>10</ns><id>20803</id><revision><id>688512</id><parentid>687083</parentid><timestamp>2013-05-11T17:18:34Z</timestamp><contributor><username>Wargo</username><id>25061</id></contributor><text xml:space="preserve" bytes="2079">{{#ifeq: Mbox | sandbox

|
Template:Template sandbox notice

}}Template:Documentation/start box2 {{#switch: {{#if:|1|0}}{{#if:|1|0}}{{#ifexist:|1|0}}{{#ifexist:Template:Documentation/docspace:Template:Documentation/template page/doc|1|0}} | 1000 | 1001 | 1010 | 1011 | 1100 | 1101 | 1110 | 1111 = | 0110 | 0111 = {{ {{{1}}} }} | 0001 | 0011 = {{ Template:Documentation/docspace:Template:Documentation/template page/doc }} | 0000 | 0100 | 0010 | 0101 = }} Template:Documentation/end box2</text><sha1>bvikrz5412m4gizkphh8ftj604e3kbf</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/docspace</title><ns>10</ns><id>93323</id><revision><id>631615</id><parentid>557279</parentid><timestamp>2013-01-20T15:55:26Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><minor/><comment>1 revision from w:en:Template:Documentation/docspace: Requested by average_drifter in #mediawiki</comment><text xml:space="preserve" bytes="302">{{#switch: Template

 | 
 | File
 | MediaWiki
 | Category = Template talk
 | #default = Template
}}</text><sha1>7f8iymss9sr4v7f4t5pza1arwjogrv3</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/end box</title><ns>10</ns><id>93324</id><revision><id>631856</id><parentid>631623</parentid><timestamp>2013-01-20T16:24:41Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><text xml:space="preserve" bytes="4124">

{{#if:

 {{#ifeq:  | off
 |
 | yes{{
   #switch: Template
   | User
   | Template = yes
   }}
 }}

| Template:Fmbox }}{{#if:

 {{#switch: Mbox
 | doc
 | testcases = strange
 }}

| [[Category:Wikipedia pages with strange ((documentation)) usage|Template:Main otherTemplate:Mbox]]

}}</text><sha1>r3qht4u0hwps2mqnst3puyi8anb9dmz</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/end box2</title><ns>10</ns><id>124329</id><revision><id>688362</id><parentid>688359</parentid><timestamp>2013-05-11T09:36:55Z</timestamp><contributor><username>Shirayuki</username><id>472859</id></contributor><comment>Undo revision 688359 by Shirayuki (talk)</comment><text xml:space="preserve" bytes="864">Template:Documentation/end box</text><sha1>sfe0ppdpxp1nwfzhpym4jwdtmgpph1p</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/start box</title><ns>10</ns><id>93326</id><revision><id>742132</id><parentid>742131</parentid><timestamp>2013-07-20T14:04:29Z</timestamp><contributor><ip>81.129.86.23</ip></contributor><text xml:space="preserve" bytes="2002">

{{#ifeq: ¬ |

|

|
{{#switch: ¬
 | ¬ =   
   {{#switch: Template 
   | Template = File:Template-info.png Template documentation
   | Template:Ns:Module = File:Template-info.png Module documentation
   | File = Summary
   | #default = Documentation
   }}
 | #default = 
   
 }}{{
 #if: 
 | 
 | 
   {{
   #if: yes
   | [view] [edit] [history] [[[:Template:Purge]]] 
   | 
     [#if:  _        | %7B%7B%7Bpreload%7D%7D%7D_        | {{#ifeq: Template | File_          | Template:Documentation/preload-filespace_          | Template:Documentation/preload_          }} }} create]
   }}
}}

}}</text><sha1>linb792zr3zrp72qrhjkmqg1mz6uevr</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/start box2</title><ns>10</ns><id>93327</id><revision><id>631642</id><parentid>585737</parentid><timestamp>2013-01-20T15:55:27Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><minor/><comment>4 revisions from w:en:Template:Documentation/start box2: Requested by average_drifter in #mediawiki</comment><text xml:space="preserve" bytes="625">Template:Documentation/start box</text><sha1>t5j6y918odlsx0iuls0qgi6wbl050q3</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/template page</title><ns>10</ns><id>93328</id><revision><id>631644</id><parentid>557289</parentid><timestamp>2013-01-20T15:55:27Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><minor/><comment>1 revision from w:en:Template:Documentation/template page: Requested by average_drifter in #mediawiki</comment><text xml:space="preserve" bytes="232">{{#switch: Mbox | sandbox | testcases = Mbox | #default = Mbox }}</text><sha1>fenc3r6oe2sito28b1d8xgyo9gpq5uf</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation subpage</title><ns>10</ns><id>20806</id><revision><id>757428</id><parentid>715052</parentid><timestamp>2013-08-05T14:14:46Z</timestamp><contributor><username>IAlex</username><id>17961</id></contributor><minor/><comment>Reverted edits by 90.219.4.40 (talk) to last revision by Shirayuki</comment><text xml:space="preserve" bytes="2616">{{#if: |

File:Edit-paste.svg This is the template documentation page for Template:Mbox.
This page may not be intended to be viewed directly.
Links using variables may appear broken; do not replace these with hardcoded page names or URLs.
{{#if:x||

}} |{{#ifeq: mbox | doc

 | 

{{

   #ifeq: show | show
   | Template loop detected: Template:Mbox
   }}{{
   #if: 
   | 
   | {{#ifeq:Template|Template|}}
 }}

| }}

}}</text><sha1>7a3si8r4k2z0aqxpbbxz1c0gmny5pb9</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Fmbox</title><ns>10</ns><id>37655</id><revision><id>558796</id><parentid>558707</parentid><timestamp>2012-07-05T06:11:26Z</timestamp><contributor><username>Krinkle</username><id>135822</id></contributor><comment>update from enwiki</comment><text xml:space="preserve" bytes="1344"> {{#ifeq:File:Emblem-question-yellow.svg|none | | }}

{{#if:

|

}}

{{#switch:style

| | warning | editnotice | system =

| #default =
This message box is using an invalid "type=style" parameter and needs fixing.
[[Category:Wikipedia message box parameter needs fixing|Template:Main otherTemplate:Mbox]]

}}</text><sha1>mrldgfpkjyqf89ukmq2vy7gh3ir2j7i</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Mbox/doc</title><ns>10</ns><id>45374</id><revision><id>659649</id><parentid>651771</parentid><timestamp>2013-03-14T09:07:42Z</timestamp><contributor><username>Krinkle</username><id>135822</id></contributor><text xml:space="preserve" bytes="14176">Template:Documentation subpage This is the Template:Tl or message box meta-template.

It is used to build message box templates such as Template:Tl. It offers several different colours, uses default images if no image parameter is given and it has some other features.

This meta-template uses the mbox CSS classes in MediaWiki:Common.css. The classes can also be used directly in a wikitable if special functionality is needed. See the how-to guide for that.

Usage

Simple usage example:

{{mbox | text = Some text.}}

Template loop detected: Template:Mbox Complex example:

{{mbox
| type       = style
| small      = left
| image      = [[File:Emblem-question-yellow.svg|40px|alt=Question mark]]
| smallimage = [[File:Emblem-question-yellow.svg|20px|alt=Question mark]]
| textstyle  = color: red; font-weight: bold; font-style: italic;
| text       = Text for a big box, for the top of articles.
| smalltext  = Text for the top of article sections.
}}

Template loop detected: Template:Mbox

But you are not really supposed to use red bold italic text.

Message box types

The following examples use different type parameters but use no image parameters thus they use the default images for each type.

Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox

Other images

The default images shown above are mostly for convenience. In many cases it is more appropriate to use more specific images. These examples use the image parameter to specify an image other than the default images.

Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox

More examples

Some other parameter combinations.

Template loop detected: Template:Mbox Template loop detected: Template:Mbox

Template loop detected: Template:Mbox

Template loop detected: Template:Mbox

Parameters

List of all parameters:

{{mbox
| type  = critical / serious / warning / notice / / move / protection
| image = none / [[File:...|40px|...]]
| imagewidth = width of image section / default is 52px
| imageright = [[File:...|40px|...]]
| imagerightwidth = width of right image section / default is 52px
| style = CSS values
| textstyle = CSS values
| text  = The message body text.
| small = {{{small|}}} / left
| smallimage = none / [[File:...|20px|...]]
| smallimageright = none / [[File:...|20px|...]]
| smalltext  = A shorter message body text.
}}

type

If no type parameter is given the template has a 'blank' style.

image

No parameter = If no image parameter is given the template uses a default image. Which default image it uses depends on the type parameter.
An image = Should be an image with usual wiki notation. Widths of 40px - 50px are usually about right. (Images over 52 pixels wide will cause padding problems, unless you also set imagewidth.)
Often an icon is purely decorative in the W3C sense that it repeats the text. To improve accessibility, it is desirable to not have it be announced by screen readers, as well as to avoid it linking to an irrelevant page. If (and only if) the image license allows this, it can be marked with "Template:ParaTemplate:Para". For example:
image = [[File:Unbalanced scales.svg|40px|link=|alt=]]
Conversely, an icon that does not use "Template:ParaTemplate:Para", and which therefore is announced to visually impaired readers, should use an "Template:Para" parameter that describes the icon. With no Template:Para parameter (using the default link), the alt text should describe the icon's visual appearance. For example:
image = [[File:Gnome globe current event.svg|40px|alt=Clock over a larger globe]]
With a nonempty "Template:Para" the alt text should describe the icon's function. For example:
image = [[File:Purple question mark.svg|40px|link=Special:Random|alt=Random article]]
An icon whose license requires attribution may have alt text, but must keep the default link. Although public domain images do not require a link, many licenses do require one. Please see Purely decorative images for more information about licensing.
none = Means that no image is used.
blank = This parameter is now deprecated. If you see it in use, change it to "image=none".

imagewidth

Optional CSS value used to set width of image's div section. Allowing you to use images wider than the default 52px wide.
Example
imagewidth=100px

imageright

No parameter = If no imageright parameter is given then no image is shown on the right side.
An image = Should be an image with usual wiki notation. 40px - 50px width are usually about right depending on the image height to width ratio. (Images over 52 pixels width will cause padding problems, unless you also set imagerightwidth.) For example:
imageright = [[File:Nuvola apps bookcase.png|40px|alt=Three stacked books]]
Anything = Any other object that you want to show on the right side.

imagerightwidth

Optional CSS value used to set width of image's div section. Allowing you to use images wider than the default 52px wide.
Example
imagerightwidth=100px

style

Optional CSS values used by the entire message box table. Without quotation marks " " but with the ending semicolons ;. For example:
style = margin-bottom: 0.5em;

textstyle

Optional CSS values used by the text cell. For example:
textstyle = text-align: center;

text

The message body text.

The small parameters

The small article message boxes are meant for the top of sections. Normally they should only contain one or two lines of text.

small

left = Makes it a smaller left aligned message box. This also makes the default images smaller. Note that any data fed to the smallimage, smallimageright and smalltext parameters is only used if "small=left". To make it so your template also understands the small parameter you can use this code:
small = {{{small|}}}

Template loop detected: Template:Mbox Template loop detected: Template:Mbox

smallimage

No parameter = If no smallimage parameter is given then this template falls back to use the image parameter. If the image parameter also is empty then a small default image is used.
An image = Should be an image with usual wiki notation. 20px width is usually about right for boxes with one line of text, while 25px width is usually about right for boxes with two lines of text. For example:
smallimage = [[File:Gnome globe current event.svg|20px|alt=Clock over a larger globe]]
none = Means that no image is used. This overrides any image fed to image, when "small=left".

Template loop detected: Template:Mbox

smallimageright

No parameter = If no smallimageright parameter is given then this template falls back to use the imageright parameter. If the imageright parameter also is empty then no image is shown on the right side.
An image = Should be an image with usual wiki notation. 20px - 25px width is usually about right. For example:
smallimageright = [[File:Nuvola apps bookcase.png|20px|alt=Three stacked books]]
Anything = Any other object that you want to show on the right side.
none = Means that no right side image is used. This overrides any image fed to imageright, when "small=left".

Template loop detected: Template:Mbox

smalltext

A shorter version of the message body text. If no smalltext parameter is given then this template falls back to use the text parameter.

Technical details

If you need to use special characters in the text parameter then you need to escape them like this:

{{mbox
| text  = <div>
Equal sign = and a start and end brace { } work fine as they are.
But here is a pipe &#124; and two end braces <nowiki>}}</nowiki>.
And now a pipe and end braces <nowiki>|}}</nowiki>.
</div>
}}

Template loop detected: Template:Mbox

The <div> tags that surround the text in the example above are usually not needed. But if the text contains line breaks then sometimes we get weird line spacing. This especially happens when using vertical dotted lists. Then use the div tags to fix that.

This template uses CSS classes in MediaWiki:Common.css for most of its looks, thus it is fully skinnable.

This template calls Template:Tl which holds most of the code for Template:Tl, while Template:Tl itself does parameter preprocessing.

Internally this meta-template uses HTML wikimarkup instead of wikimarkup for the table code. That is the usual way we make meta-templates since wikimarkup has several drawbacks. For instance it makes it harder to use parser functions and some special characters in parameters.

The default images for this meta-template are in png format instead of svg format. The main reason is that some older web browsers have trouble with the transparent background that MediaWiki renders for svg images. The png images here have hand optimised transparent background colour so they look good in all browsers. Note that svg icons only look somewhat bad in the old browsers, thus such hand optimisation is only worth the trouble for very widely used icons.

For more technical details see the talk page and the "See also" links below.

See also

Template:Mbox templates Other pages:

</text><sha1>5cafb545bbublgg4mei08dvwxs9zay9</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Mbox templates</title><ns>10</ns><id>95150</id><revision><id>692773</id><parentid>565939</parentid><timestamp>2013-05-21T16:37:34Z</timestamp><contributor><ip>90.209.78.127</ip></contributor><text xml:space="preserve" bytes="268">Template:Nmbox</text><sha1>mm2hquqpmw1k85xftye00jkid2a0l4u</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Namespace detect</title><ns>10</ns><id>79689</id><revision><id>695915</id><parentid>497627</parentid><timestamp>2013-05-27T09:23:36Z</timestamp><contributor><ip>81.129.84.113</ip></contributor><text xml:space="preserve" bytes="1470">{{#switch:

 {{#if: 
   | {{{demospace}}}
   | {{#if: 
     | 
       {{#ifeq:|
       | talk
       |  
       }}
     | 
       {{#ifeq:template|template talk
       | talk
       | template 
       }}
     }}
   }}

| main | = | talk = | user = | project = | file | image = File:Emblem-question-yellow.svg | mediawiki = | template = | help = | category = | book = | extension = | other | #default =

}}</text><sha1>qry2n28n1p12gxaxgu7gs1bkzywbpqv</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Nmbox</title><ns>10</ns><id>47495</id><revision><id>556782</id><parentid>328128</parentid><timestamp>2012-06-29T10:35:15Z</timestamp><contributor><username>Krinkle</username><id>135822</id></contributor><text xml:space="preserve" bytes="587"> {{#if:File:Emblem-question-yellow.svg | |

}}

File:Emblem-question-yellow.svg Text for a big box, for the top of articles.
</text><sha1>6k7jc6wiy6i7qy82dd4dw1xja6e8k5w</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Ombox</title><ns>10</ns><id>93344</id><revision><id>634878</id><parentid>634793</parentid><timestamp>2013-01-25T22:39:30Z</timestamp><contributor><username>Kaldari</username><id>31661</id></contributor><comment>reverting breakage</comment><text xml:space="preserve" bytes="723">{{#ifeq:left|yes

| Template:Ombox/core | Template:Ombox/core

}}</text><sha1>p9vh00dqvq0u1q3950ueg6abd93dyrt</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Ombox/core</title><ns>10</ns><id>93345</id><revision><id>680423</id><parentid>680422</parentid><timestamp>2013-04-29T09:31:02Z</timestamp><contributor><username>Siebrand</username><id>5665</id></contributor><minor/><comment>Protected "Template:Ombox/core": Highly visible template ([Edit=Allow only autoconfirmed users] (indefinite) [Move=Allow only autoconfirmed users] (indefinite))</comment><text xml:space="preserve" bytes="2250"> {{#ifeq:File:Emblem-question-yellow.svg|none | | }}

{{#if: | {{#ifeq:|none

 | 
|
 }}

}}

{{#switch:style

| | critical | important | warning | caution | license | speedy | delete | content | style | move | protection | notice =

| #default =
This message box is using an invalid "type=style" parameter and needs fixing.
[[Category:Wikipedia message box parameter needs fixing|Template:Main otherTemplate:Mbox]]

}}</text><sha1>l3n9mp2c6ch14gekpe1oxxe8thp3xdb</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Para</title><ns>10</ns><id>40658</id><revision><id>557339</id><parentid>557338</parentid><timestamp>2012-06-30T23:27:18Z</timestamp><contributor><username>Reedy</username><id>28424</id></contributor><minor/><comment>1 revision from w:en:Template:Para</comment><text xml:space="preserve" bytes="238">|{{#if:|{{{1}}}=|}}</text><sha1>3ve3qhqjaafu9wuy6em7y1fz49qyqfx</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Purge</title><ns>10</ns><id>31341</id><revision><id>405355</id><parentid>405354</parentid><timestamp>2011-05-24T01:39:17Z</timestamp><contributor><username>Peachey88</username><id>31302</id></contributor><minor/><comment>1 revision from w:en:Template:Purge: update to en.wiki</comment><text xml:space="preserve" bytes="197">Purge</text><sha1>830osaj62tvmlh6zq374ixtzbukxcih</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Tl</title><ns>10</ns><id>12644</id><redirect title="Template:Tlx"/><revision><id>760820</id><parentid>760712</parentid><timestamp>2013-08-10T10:29:27Z</timestamp><contributor><username>IAlex</username><id>17961</id></contributor><minor/><comment>Reverted edits by 175.200.179.56 (talk) to last revision by Varnent</comment><text xml:space="preserve" bytes="25">#REDIRECTTemplate:Tlx</text><sha1>avv0qklcaxr8n5r45lcc2x17y9w78sc</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Tlx</title><ns>10</ns><id>20809</id><revision><id>557363</id><parentid>534113</parentid><timestamp>2012-06-30T23:27:22Z</timestamp><contributor><username>Reedy</username><id>28424</id></contributor><minor/><comment>1 revision from w:en:Template:Tlx</comment><text xml:space="preserve" bytes="385">{{[[Template:|]]{{#if:| |{{{2}}} }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}}</text><sha1>0d6b5bkc7j2tegvw2yzm4b6iil98xqg</sha1>

But you are not really supposed to use red bold italic text.

Message box types

The following examples use different type parameters but use no image parameters thus they use the default images for each type.

<mediawiki xsi:schemaLocation="http://www.mediawiki.org/xml/export-0.8/ http://www.mediawiki.org/xml/export-0.8.xsd" version="0.8" xml:lang="en"><siteinfo><sitename>MediaWiki</sitename><base>http://www.mediawiki.org/wiki/MediaWiki</base><generator>MediaWiki 1.22wmf12</generator><case>first-letter</case><namespaces><namespace key="-2" case="first-letter">Media</namespace><namespace key="-1" case="first-letter">Special</namespace><namespace key="0" case="first-letter"/><namespace key="1" case="first-letter">Talk</namespace><namespace key="2" case="first-letter">User</namespace><namespace key="3" case="first-letter">User talk</namespace><namespace key="4" case="first-letter">Project</namespace><namespace key="5" case="first-letter">Project talk</namespace><namespace key="6" case="first-letter">File</namespace><namespace key="7" case="first-letter">File talk</namespace><namespace key="8" case="first-letter">MediaWiki</namespace><namespace key="9" case="first-letter">MediaWiki talk</namespace><namespace key="10" case="first-letter">Template</namespace><namespace key="11" case="first-letter">Template talk</namespace><namespace key="12" case="first-letter">Help</namespace><namespace key="13" case="first-letter">Help talk</namespace><namespace key="14" case="first-letter">Category</namespace><namespace key="15" case="first-letter">Category talk</namespace><namespace key="90" case="first-letter">Thread</namespace><namespace key="91" case="first-letter">Thread talk</namespace><namespace key="92" case="first-letter">Summary</namespace><namespace key="93" case="first-letter">Summary talk</namespace><namespace key="100" case="first-letter">Manual</namespace><namespace key="101" case="first-letter">Manual talk</namespace><namespace key="102" case="first-letter">Extension</namespace><namespace key="103" case="first-letter">Extension talk</namespace><namespace key="104" case="first-letter">API</namespace><namespace key="105" case="first-letter">API talk</namespace><namespace key="106" case="first-letter">Skin</namespace><namespace key="107" case="first-letter">Skin talk</namespace><namespace key="828" case="first-letter">Module</namespace><namespace key="829" case="first-letter">Module talk</namespace><namespace key="1198" case="first-letter">Translations</namespace><namespace key="1199" case="first-letter">Translations talk</namespace><namespace key="2500" case="first-letter">VisualEditor</namespace><namespace key="2501" case="first-letter">VisualEditor talk</namespace></namespaces></siteinfo><page><title>Template:Mbox</title><ns>10</ns><id>45372</id><revision><id>634882</id><parentid>634876</parentid><timestamp>2013-01-25T22:40:38Z</timestamp><contributor><username>Kaldari</username><id>31661</id></contributor><comment>reverting self, problem was in ombox template</comment><text xml:space="preserve" bytes="707">{{

 Template:Namespace detect

| type = critical | image = | imageright = | class = | style = | textstyle = | text = type=critical – Urgent warnings, such as Template:Tlx. | small = | smallimage = | smallimageright = | smalltext = | subst = | date = | name = }}</text><sha1>40w6e1mdq2t695t9dv143e1rzq5pv1o</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation</title><ns>10</ns><id>20803</id><revision><id>688512</id><parentid>687083</parentid><timestamp>2013-05-11T17:18:34Z</timestamp><contributor><username>Wargo</username><id>25061</id></contributor><text xml:space="preserve" bytes="2079">{{#ifeq: Mbox | sandbox

|
Template:Template sandbox notice

}}Template:Documentation/start box2 {{#switch: {{#if:|1|0}}{{#if:|1|0}}{{#ifexist:|1|0}}{{#ifexist:Template:Documentation/docspace:Template:Documentation/template page/doc|1|0}} | 1000 | 1001 | 1010 | 1011 | 1100 | 1101 | 1110 | 1111 = | 0110 | 0111 = {{ {{{1}}} }} | 0001 | 0011 = {{ Template:Documentation/docspace:Template:Documentation/template page/doc }} | 0000 | 0100 | 0010 | 0101 = }} Template:Documentation/end box2</text><sha1>bvikrz5412m4gizkphh8ftj604e3kbf</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/docspace</title><ns>10</ns><id>93323</id><revision><id>631615</id><parentid>557279</parentid><timestamp>2013-01-20T15:55:26Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><minor/><comment>1 revision from w:en:Template:Documentation/docspace: Requested by average_drifter in #mediawiki</comment><text xml:space="preserve" bytes="302">{{#switch: Template

 | 
 | File
 | MediaWiki
 | Category = Template talk
 | #default = Template
}}</text><sha1>7f8iymss9sr4v7f4t5pza1arwjogrv3</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/end box</title><ns>10</ns><id>93324</id><revision><id>631856</id><parentid>631623</parentid><timestamp>2013-01-20T16:24:41Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><text xml:space="preserve" bytes="4124">

{{#if:

 {{#ifeq:  | off
 |
 | yes{{
   #switch: Template
   | User
   | Template = yes
   }}
 }}

| Template:Fmbox }}{{#if:

 {{#switch: Mbox
 | doc
 | testcases = strange
 }}

| [[Category:Wikipedia pages with strange ((documentation)) usage|Template:Main otherTemplate:Mbox]]

}}</text><sha1>r3qht4u0hwps2mqnst3puyi8anb9dmz</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/end box2</title><ns>10</ns><id>124329</id><revision><id>688362</id><parentid>688359</parentid><timestamp>2013-05-11T09:36:55Z</timestamp><contributor><username>Shirayuki</username><id>472859</id></contributor><comment>Undo revision 688359 by Shirayuki (talk)</comment><text xml:space="preserve" bytes="864">Template:Documentation/end box</text><sha1>sfe0ppdpxp1nwfzhpym4jwdtmgpph1p</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/start box</title><ns>10</ns><id>93326</id><revision><id>742132</id><parentid>742131</parentid><timestamp>2013-07-20T14:04:29Z</timestamp><contributor><ip>81.129.86.23</ip></contributor><text xml:space="preserve" bytes="2002">

{{#ifeq: ¬ |

|

|
{{#switch: ¬
 | ¬ =   
   {{#switch: Template 
   | Template = File:Template-info.png Template documentation
   | Template:Ns:Module = File:Template-info.png Module documentation
   | File = Summary
   | #default = Documentation
   }}
 | #default = 
   
 }}{{
 #if: 
 | 
 | 
   {{
   #if: yes
   | [view] [edit] [history] [[[:Template:Purge]]] 
   | 
     [#if:  _        | %7B%7B%7Bpreload%7D%7D%7D_        | {{#ifeq: Template | File_          | Template:Documentation/preload-filespace_          | Template:Documentation/preload_          }} }} create]
   }}
}}

}}</text><sha1>linb792zr3zrp72qrhjkmqg1mz6uevr</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/start box2</title><ns>10</ns><id>93327</id><revision><id>631642</id><parentid>585737</parentid><timestamp>2013-01-20T15:55:27Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><minor/><comment>4 revisions from w:en:Template:Documentation/start box2: Requested by average_drifter in #mediawiki</comment><text xml:space="preserve" bytes="625">Template:Documentation/start box</text><sha1>t5j6y918odlsx0iuls0qgi6wbl050q3</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/template page</title><ns>10</ns><id>93328</id><revision><id>631644</id><parentid>557289</parentid><timestamp>2013-01-20T15:55:27Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><minor/><comment>1 revision from w:en:Template:Documentation/template page: Requested by average_drifter in #mediawiki</comment><text xml:space="preserve" bytes="232">{{#switch: Mbox | sandbox | testcases = Mbox | #default = Mbox }}</text><sha1>fenc3r6oe2sito28b1d8xgyo9gpq5uf</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation subpage</title><ns>10</ns><id>20806</id><revision><id>757428</id><parentid>715052</parentid><timestamp>2013-08-05T14:14:46Z</timestamp><contributor><username>IAlex</username><id>17961</id></contributor><minor/><comment>Reverted edits by 90.219.4.40 (talk) to last revision by Shirayuki</comment><text xml:space="preserve" bytes="2616">{{#if: |

File:Edit-paste.svg This is the template documentation page for Template:Mbox.
This page may not be intended to be viewed directly.
Links using variables may appear broken; do not replace these with hardcoded page names or URLs.
{{#if:x||

}} |{{#ifeq: mbox | doc

 | 

{{

   #ifeq: show | show
   | Template loop detected: Template:Mbox
   }}{{
   #if: 
   | 
   | {{#ifeq:Template|Template|}}
 }}

| }}

}}</text><sha1>7a3si8r4k2z0aqxpbbxz1c0gmny5pb9</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Fmbox</title><ns>10</ns><id>37655</id><revision><id>558796</id><parentid>558707</parentid><timestamp>2012-07-05T06:11:26Z</timestamp><contributor><username>Krinkle</username><id>135822</id></contributor><comment>update from enwiki</comment><text xml:space="preserve" bytes="1344"> {{#ifeq:|none | | }}

{{#if:

|

}}

{{#switch:critical

| | warning | editnotice | system =

| #default =
This message box is using an invalid "type=critical" parameter and needs fixing.
[[Category:Wikipedia message box parameter needs fixing|Template:Main otherTemplate:Mbox]]

}}</text><sha1>mrldgfpkjyqf89ukmq2vy7gh3ir2j7i</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Mbox/doc</title><ns>10</ns><id>45374</id><revision><id>659649</id><parentid>651771</parentid><timestamp>2013-03-14T09:07:42Z</timestamp><contributor><username>Krinkle</username><id>135822</id></contributor><text xml:space="preserve" bytes="14176">Template:Documentation subpage This is the Template:Tl or message box meta-template.

It is used to build message box templates such as Template:Tl. It offers several different colours, uses default images if no image parameter is given and it has some other features.

This meta-template uses the mbox CSS classes in MediaWiki:Common.css. The classes can also be used directly in a wikitable if special functionality is needed. See the how-to guide for that.

Usage

Simple usage example:

{{mbox | text = Some text.}}

Template loop detected: Template:Mbox Complex example:

{{mbox
| type       = style
| small      = left
| image      = [[File:Emblem-question-yellow.svg|40px|alt=Question mark]]
| smallimage = [[File:Emblem-question-yellow.svg|20px|alt=Question mark]]
| textstyle  = color: red; font-weight: bold; font-style: italic;
| text       = Text for a big box, for the top of articles.
| smalltext  = Text for the top of article sections.
}}

Template loop detected: Template:Mbox

But you are not really supposed to use red bold italic text.

Message box types

The following examples use different type parameters but use no image parameters thus they use the default images for each type.

Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox

Other images

The default images shown above are mostly for convenience. In many cases it is more appropriate to use more specific images. These examples use the image parameter to specify an image other than the default images.

Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox

More examples

Some other parameter combinations.

Template loop detected: Template:Mbox Template loop detected: Template:Mbox

Template loop detected: Template:Mbox

Template loop detected: Template:Mbox

Parameters

List of all parameters:

{{mbox
| type  = critical / serious / warning / notice / / move / protection
| image = none / [[File:...|40px|...]]
| imagewidth = width of image section / default is 52px
| imageright = [[File:...|40px|...]]
| imagerightwidth = width of right image section / default is 52px
| style = CSS values
| textstyle = CSS values
| text  = The message body text.
| small = {{{small|}}} / left
| smallimage = none / [[File:...|20px|...]]
| smallimageright = none / [[File:...|20px|...]]
| smalltext  = A shorter message body text.
}}

type

If no type parameter is given the template has a 'blank' style.

image

No parameter = If no image parameter is given the template uses a default image. Which default image it uses depends on the type parameter.
An image = Should be an image with usual wiki notation. Widths of 40px - 50px are usually about right. (Images over 52 pixels wide will cause padding problems, unless you also set imagewidth.)
Often an icon is purely decorative in the W3C sense that it repeats the text. To improve accessibility, it is desirable to not have it be announced by screen readers, as well as to avoid it linking to an irrelevant page. If (and only if) the image license allows this, it can be marked with "Template:ParaTemplate:Para". For example:
image = [[File:Unbalanced scales.svg|40px|link=|alt=]]
Conversely, an icon that does not use "Template:ParaTemplate:Para", and which therefore is announced to visually impaired readers, should use an "Template:Para" parameter that describes the icon. With no Template:Para parameter (using the default link), the alt text should describe the icon's visual appearance. For example:
image = [[File:Gnome globe current event.svg|40px|alt=Clock over a larger globe]]
With a nonempty "Template:Para" the alt text should describe the icon's function. For example:
image = [[File:Purple question mark.svg|40px|link=Special:Random|alt=Random article]]
An icon whose license requires attribution may have alt text, but must keep the default link. Although public domain images do not require a link, many licenses do require one. Please see Purely decorative images for more information about licensing.
none = Means that no image is used.
blank = This parameter is now deprecated. If you see it in use, change it to "image=none".

imagewidth

Optional CSS value used to set width of image's div section. Allowing you to use images wider than the default 52px wide.
Example
imagewidth=100px

imageright

No parameter = If no imageright parameter is given then no image is shown on the right side.
An image = Should be an image with usual wiki notation. 40px - 50px width are usually about right depending on the image height to width ratio. (Images over 52 pixels width will cause padding problems, unless you also set imagerightwidth.) For example:
imageright = [[File:Nuvola apps bookcase.png|40px|alt=Three stacked books]]
Anything = Any other object that you want to show on the right side.

imagerightwidth

Optional CSS value used to set width of image's div section. Allowing you to use images wider than the default 52px wide.
Example
imagerightwidth=100px

style

Optional CSS values used by the entire message box table. Without quotation marks " " but with the ending semicolons ;. For example:
style = margin-bottom: 0.5em;

textstyle

Optional CSS values used by the text cell. For example:
textstyle = text-align: center;

text

The message body text.

The small parameters

The small article message boxes are meant for the top of sections. Normally they should only contain one or two lines of text.

small

left = Makes it a smaller left aligned message box. This also makes the default images smaller. Note that any data fed to the smallimage, smallimageright and smalltext parameters is only used if "small=left". To make it so your template also understands the small parameter you can use this code:
small = {{{small|}}}

Template loop detected: Template:Mbox Template loop detected: Template:Mbox

smallimage

No parameter = If no smallimage parameter is given then this template falls back to use the image parameter. If the image parameter also is empty then a small default image is used.
An image = Should be an image with usual wiki notation. 20px width is usually about right for boxes with one line of text, while 25px width is usually about right for boxes with two lines of text. For example:
smallimage = [[File:Gnome globe current event.svg|20px|alt=Clock over a larger globe]]
none = Means that no image is used. This overrides any image fed to image, when "small=left".

Template loop detected: Template:Mbox

smallimageright

No parameter = If no smallimageright parameter is given then this template falls back to use the imageright parameter. If the imageright parameter also is empty then no image is shown on the right side.
An image = Should be an image with usual wiki notation. 20px - 25px width is usually about right. For example:
smallimageright = [[File:Nuvola apps bookcase.png|20px|alt=Three stacked books]]
Anything = Any other object that you want to show on the right side.
none = Means that no right side image is used. This overrides any image fed to imageright, when "small=left".

Template loop detected: Template:Mbox

smalltext

A shorter version of the message body text. If no smalltext parameter is given then this template falls back to use the text parameter.

Technical details

If you need to use special characters in the text parameter then you need to escape them like this:

{{mbox
| text  = <div>
Equal sign = and a start and end brace { } work fine as they are.
But here is a pipe &#124; and two end braces <nowiki>}}</nowiki>.
And now a pipe and end braces <nowiki>|}}</nowiki>.
</div>
}}

Template loop detected: Template:Mbox

The <div> tags that surround the text in the example above are usually not needed. But if the text contains line breaks then sometimes we get weird line spacing. This especially happens when using vertical dotted lists. Then use the div tags to fix that.

This template uses CSS classes in MediaWiki:Common.css for most of its looks, thus it is fully skinnable.

This template calls Template:Tl which holds most of the code for Template:Tl, while Template:Tl itself does parameter preprocessing.

Internally this meta-template uses HTML wikimarkup instead of wikimarkup for the table code. That is the usual way we make meta-templates since wikimarkup has several drawbacks. For instance it makes it harder to use parser functions and some special characters in parameters.

The default images for this meta-template are in png format instead of svg format. The main reason is that some older web browsers have trouble with the transparent background that MediaWiki renders for svg images. The png images here have hand optimised transparent background colour so they look good in all browsers. Note that svg icons only look somewhat bad in the old browsers, thus such hand optimisation is only worth the trouble for very widely used icons.

For more technical details see the talk page and the "See also" links below.

See also

Template:Mbox templates Other pages:

</text><sha1>5cafb545bbublgg4mei08dvwxs9zay9</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Mbox templates</title><ns>10</ns><id>95150</id><revision><id>692773</id><parentid>565939</parentid><timestamp>2013-05-21T16:37:34Z</timestamp><contributor><ip>90.209.78.127</ip></contributor><text xml:space="preserve" bytes="268">Template:Nmbox</text><sha1>mm2hquqpmw1k85xftye00jkid2a0l4u</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Namespace detect</title><ns>10</ns><id>79689</id><revision><id>695915</id><parentid>497627</parentid><timestamp>2013-05-27T09:23:36Z</timestamp><contributor><ip>81.129.84.113</ip></contributor><text xml:space="preserve" bytes="1470">{{#switch:

 {{#if: 
   | {{{demospace}}}
   | {{#if: 
     | 
       {{#ifeq:|
       | talk
       |  
       }}
     | 
       {{#ifeq:template|template talk
       | talk
       | template 
       }}
     }}
   }}

| main | = | talk = | user = | project = | file | image = | mediawiki = | template = | help = | category = | book = | extension = | other | #default =

}}</text><sha1>qry2n28n1p12gxaxgu7gs1bkzywbpqv</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Nmbox</title><ns>10</ns><id>47495</id><revision><id>556782</id><parentid>328128</parentid><timestamp>2012-06-29T10:35:15Z</timestamp><contributor><username>Krinkle</username><id>135822</id></contributor><text xml:space="preserve" bytes="587"> {{#if: | |

}}

type=critical – Urgent warnings, such as Template:Tlx.
</text><sha1>6k7jc6wiy6i7qy82dd4dw1xja6e8k5w</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Ombox</title><ns>10</ns><id>93344</id><revision><id>634878</id><parentid>634793</parentid><timestamp>2013-01-25T22:39:30Z</timestamp><contributor><username>Kaldari</username><id>31661</id></contributor><comment>reverting breakage</comment><text xml:space="preserve" bytes="723">{{#ifeq:|yes

| Template:Ombox/core | Template:Ombox/core

}}</text><sha1>p9vh00dqvq0u1q3950ueg6abd93dyrt</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Ombox/core</title><ns>10</ns><id>93345</id><revision><id>680423</id><parentid>680422</parentid><timestamp>2013-04-29T09:31:02Z</timestamp><contributor><username>Siebrand</username><id>5665</id></contributor><minor/><comment>Protected "Template:Ombox/core": Highly visible template ([Edit=Allow only autoconfirmed users] (indefinite) [Move=Allow only autoconfirmed users] (indefinite))</comment><text xml:space="preserve" bytes="2250"> {{#ifeq:|none | | }}

{{#if: | {{#ifeq:|none

 | 
|
 }}

}}

{{#switch:critical

| | critical | important | warning | caution | license | speedy | delete | content | style | move | protection | notice =

| #default =
This message box is using an invalid "type=critical" parameter and needs fixing.
[[Category:Wikipedia message box parameter needs fixing|Template:Main otherTemplate:Mbox]]

}}</text><sha1>l3n9mp2c6ch14gekpe1oxxe8thp3xdb</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Para</title><ns>10</ns><id>40658</id><revision><id>557339</id><parentid>557338</parentid><timestamp>2012-06-30T23:27:18Z</timestamp><contributor><username>Reedy</username><id>28424</id></contributor><minor/><comment>1 revision from w:en:Template:Para</comment><text xml:space="preserve" bytes="238">|{{#if:|{{{1}}}=|}}</text><sha1>3ve3qhqjaafu9wuy6em7y1fz49qyqfx</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Purge</title><ns>10</ns><id>31341</id><revision><id>405355</id><parentid>405354</parentid><timestamp>2011-05-24T01:39:17Z</timestamp><contributor><username>Peachey88</username><id>31302</id></contributor><minor/><comment>1 revision from w:en:Template:Purge: update to en.wiki</comment><text xml:space="preserve" bytes="197">Purge</text><sha1>830osaj62tvmlh6zq374ixtzbukxcih</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Tl</title><ns>10</ns><id>12644</id><redirect title="Template:Tlx"/><revision><id>760820</id><parentid>760712</parentid><timestamp>2013-08-10T10:29:27Z</timestamp><contributor><username>IAlex</username><id>17961</id></contributor><minor/><comment>Reverted edits by 175.200.179.56 (talk) to last revision by Varnent</comment><text xml:space="preserve" bytes="25">#REDIRECTTemplate:Tlx</text><sha1>avv0qklcaxr8n5r45lcc2x17y9w78sc</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Tlx</title><ns>10</ns><id>20809</id><revision><id>557363</id><parentid>534113</parentid><timestamp>2012-06-30T23:27:22Z</timestamp><contributor><username>Reedy</username><id>28424</id></contributor><minor/><comment>1 revision from w:en:Template:Tlx</comment><text xml:space="preserve" bytes="385">{{[[Template:|]]{{#if:| |{{{2}}} }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}}</text><sha1>0d6b5bkc7j2tegvw2yzm4b6iil98xqg</sha1> <mediawiki xsi:schemaLocation="http://www.mediawiki.org/xml/export-0.8/ http://www.mediawiki.org/xml/export-0.8.xsd" version="0.8" xml:lang="en"><siteinfo><sitename>MediaWiki</sitename><base>http://www.mediawiki.org/wiki/MediaWiki</base><generator>MediaWiki 1.22wmf12</generator><case>first-letter</case><namespaces><namespace key="-2" case="first-letter">Media</namespace><namespace key="-1" case="first-letter">Special</namespace><namespace key="0" case="first-letter"/><namespace key="1" case="first-letter">Talk</namespace><namespace key="2" case="first-letter">User</namespace><namespace key="3" case="first-letter">User talk</namespace><namespace key="4" case="first-letter">Project</namespace><namespace key="5" case="first-letter">Project talk</namespace><namespace key="6" case="first-letter">File</namespace><namespace key="7" case="first-letter">File talk</namespace><namespace key="8" case="first-letter">MediaWiki</namespace><namespace key="9" case="first-letter">MediaWiki talk</namespace><namespace key="10" case="first-letter">Template</namespace><namespace key="11" case="first-letter">Template talk</namespace><namespace key="12" case="first-letter">Help</namespace><namespace key="13" case="first-letter">Help talk</namespace><namespace key="14" case="first-letter">Category</namespace><namespace key="15" case="first-letter">Category talk</namespace><namespace key="90" case="first-letter">Thread</namespace><namespace key="91" case="first-letter">Thread talk</namespace><namespace key="92" case="first-letter">Summary</namespace><namespace key="93" case="first-letter">Summary talk</namespace><namespace key="100" case="first-letter">Manual</namespace><namespace key="101" case="first-letter">Manual talk</namespace><namespace key="102" case="first-letter">Extension</namespace><namespace key="103" case="first-letter">Extension talk</namespace><namespace key="104" case="first-letter">API</namespace><namespace key="105" case="first-letter">API talk</namespace><namespace key="106" case="first-letter">Skin</namespace><namespace key="107" case="first-letter">Skin talk</namespace><namespace key="828" case="first-letter">Module</namespace><namespace key="829" case="first-letter">Module talk</namespace><namespace key="1198" case="first-letter">Translations</namespace><namespace key="1199" case="first-letter">Translations talk</namespace><namespace key="2500" case="first-letter">VisualEditor</namespace><namespace key="2501" case="first-letter">VisualEditor talk</namespace></namespaces></siteinfo><page><title>Template:Mbox</title><ns>10</ns><id>45372</id><revision><id>634882</id><parentid>634876</parentid><timestamp>2013-01-25T22:40:38Z</timestamp><contributor><username>Kaldari</username><id>31661</id></contributor><comment>reverting self, problem was in ombox template</comment><text xml:space="preserve" bytes="707">{{

 Template:Namespace detect

| type = important | image = | imageright = | class = | style = | textstyle = | text = type=important – Serious problems, such as Template:Tl. | small = | smallimage = | smallimageright = | smalltext = | subst = | date = | name = }}</text><sha1>40w6e1mdq2t695t9dv143e1rzq5pv1o</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation</title><ns>10</ns><id>20803</id><revision><id>688512</id><parentid>687083</parentid><timestamp>2013-05-11T17:18:34Z</timestamp><contributor><username>Wargo</username><id>25061</id></contributor><text xml:space="preserve" bytes="2079">{{#ifeq: Mbox | sandbox

|
Template:Template sandbox notice

}}Template:Documentation/start box2 {{#switch: {{#if:|1|0}}{{#if:|1|0}}{{#ifexist:|1|0}}{{#ifexist:Template:Documentation/docspace:Template:Documentation/template page/doc|1|0}} | 1000 | 1001 | 1010 | 1011 | 1100 | 1101 | 1110 | 1111 = | 0110 | 0111 = {{ {{{1}}} }} | 0001 | 0011 = {{ Template:Documentation/docspace:Template:Documentation/template page/doc }} | 0000 | 0100 | 0010 | 0101 = }} Template:Documentation/end box2</text><sha1>bvikrz5412m4gizkphh8ftj604e3kbf</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/docspace</title><ns>10</ns><id>93323</id><revision><id>631615</id><parentid>557279</parentid><timestamp>2013-01-20T15:55:26Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><minor/><comment>1 revision from w:en:Template:Documentation/docspace: Requested by average_drifter in #mediawiki</comment><text xml:space="preserve" bytes="302">{{#switch: Template

 | 
 | File
 | MediaWiki
 | Category = Template talk
 | #default = Template
}}</text><sha1>7f8iymss9sr4v7f4t5pza1arwjogrv3</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/end box</title><ns>10</ns><id>93324</id><revision><id>631856</id><parentid>631623</parentid><timestamp>2013-01-20T16:24:41Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><text xml:space="preserve" bytes="4124">

{{#if:

 {{#ifeq:  | off
 |
 | yes{{
   #switch: Template
   | User
   | Template = yes
   }}
 }}

| Template:Fmbox }}{{#if:

 {{#switch: Mbox
 | doc
 | testcases = strange
 }}

| [[Category:Wikipedia pages with strange ((documentation)) usage|Template:Main otherTemplate:Mbox]]

}}</text><sha1>r3qht4u0hwps2mqnst3puyi8anb9dmz</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/end box2</title><ns>10</ns><id>124329</id><revision><id>688362</id><parentid>688359</parentid><timestamp>2013-05-11T09:36:55Z</timestamp><contributor><username>Shirayuki</username><id>472859</id></contributor><comment>Undo revision 688359 by Shirayuki (talk)</comment><text xml:space="preserve" bytes="864">Template:Documentation/end box</text><sha1>sfe0ppdpxp1nwfzhpym4jwdtmgpph1p</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/start box</title><ns>10</ns><id>93326</id><revision><id>742132</id><parentid>742131</parentid><timestamp>2013-07-20T14:04:29Z</timestamp><contributor><ip>81.129.86.23</ip></contributor><text xml:space="preserve" bytes="2002">

{{#ifeq: ¬ |

|

|
{{#switch: ¬
 | ¬ =   
   {{#switch: Template 
   | Template = File:Template-info.png Template documentation
   | Template:Ns:Module = File:Template-info.png Module documentation
   | File = Summary
   | #default = Documentation
   }}
 | #default = 
   
 }}{{
 #if: 
 | 
 | 
   {{
   #if: yes
   | [view] [edit] [history] [[[:Template:Purge]]] 
   | 
     [#if:  _        | %7B%7B%7Bpreload%7D%7D%7D_        | {{#ifeq: Template | File_          | Template:Documentation/preload-filespace_          | Template:Documentation/preload_          }} }} create]
   }}
}}

}}</text><sha1>linb792zr3zrp72qrhjkmqg1mz6uevr</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/start box2</title><ns>10</ns><id>93327</id><revision><id>631642</id><parentid>585737</parentid><timestamp>2013-01-20T15:55:27Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><minor/><comment>4 revisions from w:en:Template:Documentation/start box2: Requested by average_drifter in #mediawiki</comment><text xml:space="preserve" bytes="625">Template:Documentation/start box</text><sha1>t5j6y918odlsx0iuls0qgi6wbl050q3</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/template page</title><ns>10</ns><id>93328</id><revision><id>631644</id><parentid>557289</parentid><timestamp>2013-01-20T15:55:27Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><minor/><comment>1 revision from w:en:Template:Documentation/template page: Requested by average_drifter in #mediawiki</comment><text xml:space="preserve" bytes="232">{{#switch: Mbox | sandbox | testcases = Mbox | #default = Mbox }}</text><sha1>fenc3r6oe2sito28b1d8xgyo9gpq5uf</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation subpage</title><ns>10</ns><id>20806</id><revision><id>757428</id><parentid>715052</parentid><timestamp>2013-08-05T14:14:46Z</timestamp><contributor><username>IAlex</username><id>17961</id></contributor><minor/><comment>Reverted edits by 90.219.4.40 (talk) to last revision by Shirayuki</comment><text xml:space="preserve" bytes="2616">{{#if: |

File:Edit-paste.svg This is the template documentation page for Template:Mbox.
This page may not be intended to be viewed directly.
Links using variables may appear broken; do not replace these with hardcoded page names or URLs.
{{#if:x||

}} |{{#ifeq: mbox | doc

 | 

{{

   #ifeq: show | show
   | Template loop detected: Template:Mbox
   }}{{
   #if: 
   | 
   | {{#ifeq:Template|Template|}}
 }}

| }}

}}</text><sha1>7a3si8r4k2z0aqxpbbxz1c0gmny5pb9</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Fmbox</title><ns>10</ns><id>37655</id><revision><id>558796</id><parentid>558707</parentid><timestamp>2012-07-05T06:11:26Z</timestamp><contributor><username>Krinkle</username><id>135822</id></contributor><comment>update from enwiki</comment><text xml:space="preserve" bytes="1344"> {{#ifeq:|none | | }}

{{#if:

|

}}

{{#switch:important

| | warning | editnotice | system =

| #default =
This message box is using an invalid "type=important" parameter and needs fixing.
[[Category:Wikipedia message box parameter needs fixing|Template:Main otherTemplate:Mbox]]

}}</text><sha1>mrldgfpkjyqf89ukmq2vy7gh3ir2j7i</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Mbox/doc</title><ns>10</ns><id>45374</id><revision><id>659649</id><parentid>651771</parentid><timestamp>2013-03-14T09:07:42Z</timestamp><contributor><username>Krinkle</username><id>135822</id></contributor><text xml:space="preserve" bytes="14176">Template:Documentation subpage This is the Template:Tl or message box meta-template.

It is used to build message box templates such as Template:Tl. It offers several different colours, uses default images if no image parameter is given and it has some other features.

This meta-template uses the mbox CSS classes in MediaWiki:Common.css. The classes can also be used directly in a wikitable if special functionality is needed. See the how-to guide for that.

Usage

Simple usage example:

{{mbox | text = Some text.}}

Template loop detected: Template:Mbox Complex example:

{{mbox
| type       = style
| small      = left
| image      = [[File:Emblem-question-yellow.svg|40px|alt=Question mark]]
| smallimage = [[File:Emblem-question-yellow.svg|20px|alt=Question mark]]
| textstyle  = color: red; font-weight: bold; font-style: italic;
| text       = Text for a big box, for the top of articles.
| smalltext  = Text for the top of article sections.
}}

Template loop detected: Template:Mbox

But you are not really supposed to use red bold italic text.

Message box types

The following examples use different type parameters but use no image parameters thus they use the default images for each type.

Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox

Other images

The default images shown above are mostly for convenience. In many cases it is more appropriate to use more specific images. These examples use the image parameter to specify an image other than the default images.

Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox

More examples

Some other parameter combinations.

Template loop detected: Template:Mbox Template loop detected: Template:Mbox

Template loop detected: Template:Mbox

Template loop detected: Template:Mbox

Parameters

List of all parameters:

{{mbox
| type  = critical / serious / warning / notice / / move / protection
| image = none / [[File:...|40px|...]]
| imagewidth = width of image section / default is 52px
| imageright = [[File:...|40px|...]]
| imagerightwidth = width of right image section / default is 52px
| style = CSS values
| textstyle = CSS values
| text  = The message body text.
| small = {{{small|}}} / left
| smallimage = none / [[File:...|20px|...]]
| smallimageright = none / [[File:...|20px|...]]
| smalltext  = A shorter message body text.
}}

type

If no type parameter is given the template has a 'blank' style.

image

No parameter = If no image parameter is given the template uses a default image. Which default image it uses depends on the type parameter.
An image = Should be an image with usual wiki notation. Widths of 40px - 50px are usually about right. (Images over 52 pixels wide will cause padding problems, unless you also set imagewidth.)
Often an icon is purely decorative in the W3C sense that it repeats the text. To improve accessibility, it is desirable to not have it be announced by screen readers, as well as to avoid it linking to an irrelevant page. If (and only if) the image license allows this, it can be marked with "Template:ParaTemplate:Para". For example:
image = [[File:Unbalanced scales.svg|40px|link=|alt=]]
Conversely, an icon that does not use "Template:ParaTemplate:Para", and which therefore is announced to visually impaired readers, should use an "Template:Para" parameter that describes the icon. With no Template:Para parameter (using the default link), the alt text should describe the icon's visual appearance. For example:
image = [[File:Gnome globe current event.svg|40px|alt=Clock over a larger globe]]
With a nonempty "Template:Para" the alt text should describe the icon's function. For example:
image = [[File:Purple question mark.svg|40px|link=Special:Random|alt=Random article]]
An icon whose license requires attribution may have alt text, but must keep the default link. Although public domain images do not require a link, many licenses do require one. Please see Purely decorative images for more information about licensing.
none = Means that no image is used.
blank = This parameter is now deprecated. If you see it in use, change it to "image=none".

imagewidth

Optional CSS value used to set width of image's div section. Allowing you to use images wider than the default 52px wide.
Example
imagewidth=100px

imageright

No parameter = If no imageright parameter is given then no image is shown on the right side.
An image = Should be an image with usual wiki notation. 40px - 50px width are usually about right depending on the image height to width ratio. (Images over 52 pixels width will cause padding problems, unless you also set imagerightwidth.) For example:
imageright = [[File:Nuvola apps bookcase.png|40px|alt=Three stacked books]]
Anything = Any other object that you want to show on the right side.

imagerightwidth

Optional CSS value used to set width of image's div section. Allowing you to use images wider than the default 52px wide.
Example
imagerightwidth=100px

style

Optional CSS values used by the entire message box table. Without quotation marks " " but with the ending semicolons ;. For example:
style = margin-bottom: 0.5em;

textstyle

Optional CSS values used by the text cell. For example:
textstyle = text-align: center;

text

The message body text.

The small parameters

The small article message boxes are meant for the top of sections. Normally they should only contain one or two lines of text.

small

left = Makes it a smaller left aligned message box. This also makes the default images smaller. Note that any data fed to the smallimage, smallimageright and smalltext parameters is only used if "small=left". To make it so your template also understands the small parameter you can use this code:
small = {{{small|}}}

Template loop detected: Template:Mbox Template loop detected: Template:Mbox

smallimage

No parameter = If no smallimage parameter is given then this template falls back to use the image parameter. If the image parameter also is empty then a small default image is used.
An image = Should be an image with usual wiki notation. 20px width is usually about right for boxes with one line of text, while 25px width is usually about right for boxes with two lines of text. For example:
smallimage = [[File:Gnome globe current event.svg|20px|alt=Clock over a larger globe]]
none = Means that no image is used. This overrides any image fed to image, when "small=left".

Template loop detected: Template:Mbox

smallimageright

No parameter = If no smallimageright parameter is given then this template falls back to use the imageright parameter. If the imageright parameter also is empty then no image is shown on the right side.
An image = Should be an image with usual wiki notation. 20px - 25px width is usually about right. For example:
smallimageright = [[File:Nuvola apps bookcase.png|20px|alt=Three stacked books]]
Anything = Any other object that you want to show on the right side.
none = Means that no right side image is used. This overrides any image fed to imageright, when "small=left".

Template loop detected: Template:Mbox

smalltext

A shorter version of the message body text. If no smalltext parameter is given then this template falls back to use the text parameter.

Technical details

If you need to use special characters in the text parameter then you need to escape them like this:

{{mbox
| text  = <div>
Equal sign = and a start and end brace { } work fine as they are.
But here is a pipe &#124; and two end braces <nowiki>}}</nowiki>.
And now a pipe and end braces <nowiki>|}}</nowiki>.
</div>
}}

Template loop detected: Template:Mbox

The <div> tags that surround the text in the example above are usually not needed. But if the text contains line breaks then sometimes we get weird line spacing. This especially happens when using vertical dotted lists. Then use the div tags to fix that.

This template uses CSS classes in MediaWiki:Common.css for most of its looks, thus it is fully skinnable.

This template calls Template:Tl which holds most of the code for Template:Tl, while Template:Tl itself does parameter preprocessing.

Internally this meta-template uses HTML wikimarkup instead of wikimarkup for the table code. That is the usual way we make meta-templates since wikimarkup has several drawbacks. For instance it makes it harder to use parser functions and some special characters in parameters.

The default images for this meta-template are in png format instead of svg format. The main reason is that some older web browsers have trouble with the transparent background that MediaWiki renders for svg images. The png images here have hand optimised transparent background colour so they look good in all browsers. Note that svg icons only look somewhat bad in the old browsers, thus such hand optimisation is only worth the trouble for very widely used icons.

For more technical details see the talk page and the "See also" links below.

See also

Template:Mbox templates Other pages:

</text><sha1>5cafb545bbublgg4mei08dvwxs9zay9</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Mbox templates</title><ns>10</ns><id>95150</id><revision><id>692773</id><parentid>565939</parentid><timestamp>2013-05-21T16:37:34Z</timestamp><contributor><ip>90.209.78.127</ip></contributor><text xml:space="preserve" bytes="268">Template:Nmbox</text><sha1>mm2hquqpmw1k85xftye00jkid2a0l4u</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Namespace detect</title><ns>10</ns><id>79689</id><revision><id>695915</id><parentid>497627</parentid><timestamp>2013-05-27T09:23:36Z</timestamp><contributor><ip>81.129.84.113</ip></contributor><text xml:space="preserve" bytes="1470">{{#switch:

 {{#if: 
   | {{{demospace}}}
   | {{#if: 
     | 
       {{#ifeq:|
       | talk
       |  
       }}
     | 
       {{#ifeq:template|template talk
       | talk
       | template 
       }}
     }}
   }}

| main | = | talk = | user = | project = | file | image = | mediawiki = | template = | help = | category = | book = | extension = | other | #default =

}}</text><sha1>qry2n28n1p12gxaxgu7gs1bkzywbpqv</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Nmbox</title><ns>10</ns><id>47495</id><revision><id>556782</id><parentid>328128</parentid><timestamp>2012-06-29T10:35:15Z</timestamp><contributor><username>Krinkle</username><id>135822</id></contributor><text xml:space="preserve" bytes="587"> {{#if: | |

}}

type=important – Serious problems, such as Template:Tl.
</text><sha1>6k7jc6wiy6i7qy82dd4dw1xja6e8k5w</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Ombox</title><ns>10</ns><id>93344</id><revision><id>634878</id><parentid>634793</parentid><timestamp>2013-01-25T22:39:30Z</timestamp><contributor><username>Kaldari</username><id>31661</id></contributor><comment>reverting breakage</comment><text xml:space="preserve" bytes="723">{{#ifeq:|yes

| Template:Ombox/core | Template:Ombox/core

}}</text><sha1>p9vh00dqvq0u1q3950ueg6abd93dyrt</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Ombox/core</title><ns>10</ns><id>93345</id><revision><id>680423</id><parentid>680422</parentid><timestamp>2013-04-29T09:31:02Z</timestamp><contributor><username>Siebrand</username><id>5665</id></contributor><minor/><comment>Protected "Template:Ombox/core": Highly visible template ([Edit=Allow only autoconfirmed users] (indefinite) [Move=Allow only autoconfirmed users] (indefinite))</comment><text xml:space="preserve" bytes="2250"> {{#ifeq:|none | | }}

{{#if: | {{#ifeq:|none

 | 
|
 }}

}}

{{#switch:important

| | critical | important | warning | caution | license | speedy | delete | content | style | move | protection | notice =

| #default =
This message box is using an invalid "type=important" parameter and needs fixing.
[[Category:Wikipedia message box parameter needs fixing|Template:Main otherTemplate:Mbox]]

}}</text><sha1>l3n9mp2c6ch14gekpe1oxxe8thp3xdb</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Para</title><ns>10</ns><id>40658</id><revision><id>557339</id><parentid>557338</parentid><timestamp>2012-06-30T23:27:18Z</timestamp><contributor><username>Reedy</username><id>28424</id></contributor><minor/><comment>1 revision from w:en:Template:Para</comment><text xml:space="preserve" bytes="238">|{{#if:|{{{1}}}=|}}</text><sha1>3ve3qhqjaafu9wuy6em7y1fz49qyqfx</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Purge</title><ns>10</ns><id>31341</id><revision><id>405355</id><parentid>405354</parentid><timestamp>2011-05-24T01:39:17Z</timestamp><contributor><username>Peachey88</username><id>31302</id></contributor><minor/><comment>1 revision from w:en:Template:Purge: update to en.wiki</comment><text xml:space="preserve" bytes="197">Purge</text><sha1>830osaj62tvmlh6zq374ixtzbukxcih</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Tl</title><ns>10</ns><id>12644</id><redirect title="Template:Tlx"/><revision><id>760820</id><parentid>760712</parentid><timestamp>2013-08-10T10:29:27Z</timestamp><contributor><username>IAlex</username><id>17961</id></contributor><minor/><comment>Reverted edits by 175.200.179.56 (talk) to last revision by Varnent</comment><text xml:space="preserve" bytes="25">#REDIRECTTemplate:Tlx</text><sha1>avv0qklcaxr8n5r45lcc2x17y9w78sc</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Tlx</title><ns>10</ns><id>20809</id><revision><id>557363</id><parentid>534113</parentid><timestamp>2012-06-30T23:27:22Z</timestamp><contributor><username>Reedy</username><id>28424</id></contributor><minor/><comment>1 revision from w:en:Template:Tlx</comment><text xml:space="preserve" bytes="385">{{[[Template:|]]{{#if:| |{{{2}}} }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}}</text><sha1>0d6b5bkc7j2tegvw2yzm4b6iil98xqg</sha1> <mediawiki xsi:schemaLocation="http://www.mediawiki.org/xml/export-0.8/ http://www.mediawiki.org/xml/export-0.8.xsd" version="0.8" xml:lang="en"><siteinfo><sitename>MediaWiki</sitename><base>http://www.mediawiki.org/wiki/MediaWiki</base><generator>MediaWiki 1.22wmf12</generator><case>first-letter</case><namespaces><namespace key="-2" case="first-letter">Media</namespace><namespace key="-1" case="first-letter">Special</namespace><namespace key="0" case="first-letter"/><namespace key="1" case="first-letter">Talk</namespace><namespace key="2" case="first-letter">User</namespace><namespace key="3" case="first-letter">User talk</namespace><namespace key="4" case="first-letter">Project</namespace><namespace key="5" case="first-letter">Project talk</namespace><namespace key="6" case="first-letter">File</namespace><namespace key="7" case="first-letter">File talk</namespace><namespace key="8" case="first-letter">MediaWiki</namespace><namespace key="9" case="first-letter">MediaWiki talk</namespace><namespace key="10" case="first-letter">Template</namespace><namespace key="11" case="first-letter">Template talk</namespace><namespace key="12" case="first-letter">Help</namespace><namespace key="13" case="first-letter">Help talk</namespace><namespace key="14" case="first-letter">Category</namespace><namespace key="15" case="first-letter">Category talk</namespace><namespace key="90" case="first-letter">Thread</namespace><namespace key="91" case="first-letter">Thread talk</namespace><namespace key="92" case="first-letter">Summary</namespace><namespace key="93" case="first-letter">Summary talk</namespace><namespace key="100" case="first-letter">Manual</namespace><namespace key="101" case="first-letter">Manual talk</namespace><namespace key="102" case="first-letter">Extension</namespace><namespace key="103" case="first-letter">Extension talk</namespace><namespace key="104" case="first-letter">API</namespace><namespace key="105" case="first-letter">API talk</namespace><namespace key="106" case="first-letter">Skin</namespace><namespace key="107" case="first-letter">Skin talk</namespace><namespace key="828" case="first-letter">Module</namespace><namespace key="829" case="first-letter">Module talk</namespace><namespace key="1198" case="first-letter">Translations</namespace><namespace key="1199" case="first-letter">Translations talk</namespace><namespace key="2500" case="first-letter">VisualEditor</namespace><namespace key="2501" case="first-letter">VisualEditor talk</namespace></namespaces></siteinfo><page><title>Template:Mbox</title><ns>10</ns><id>45372</id><revision><id>634882</id><parentid>634876</parentid><timestamp>2013-01-25T22:40:38Z</timestamp><contributor><username>Kaldari</username><id>31661</id></contributor><comment>reverting self, problem was in ombox template</comment><text xml:space="preserve" bytes="707">{{

 Template:Namespace detect

| type = warning | image = | imageright = | class = | style = | textstyle = | text = type=warning – Other problems, such as Template:Tl. | small = | smallimage = | smallimageright = | smalltext = | subst = | date = | name = }}</text><sha1>40w6e1mdq2t695t9dv143e1rzq5pv1o</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation</title><ns>10</ns><id>20803</id><revision><id>688512</id><parentid>687083</parentid><timestamp>2013-05-11T17:18:34Z</timestamp><contributor><username>Wargo</username><id>25061</id></contributor><text xml:space="preserve" bytes="2079">{{#ifeq: Mbox | sandbox

|
Template:Template sandbox notice

}}Template:Documentation/start box2 {{#switch: {{#if:|1|0}}{{#if:|1|0}}{{#ifexist:|1|0}}{{#ifexist:Template:Documentation/docspace:Template:Documentation/template page/doc|1|0}} | 1000 | 1001 | 1010 | 1011 | 1100 | 1101 | 1110 | 1111 = | 0110 | 0111 = {{ {{{1}}} }} | 0001 | 0011 = {{ Template:Documentation/docspace:Template:Documentation/template page/doc }} | 0000 | 0100 | 0010 | 0101 = }} Template:Documentation/end box2</text><sha1>bvikrz5412m4gizkphh8ftj604e3kbf</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/docspace</title><ns>10</ns><id>93323</id><revision><id>631615</id><parentid>557279</parentid><timestamp>2013-01-20T15:55:26Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><minor/><comment>1 revision from w:en:Template:Documentation/docspace: Requested by average_drifter in #mediawiki</comment><text xml:space="preserve" bytes="302">{{#switch: Template

 | 
 | File
 | MediaWiki
 | Category = Template talk
 | #default = Template
}}</text><sha1>7f8iymss9sr4v7f4t5pza1arwjogrv3</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/end box</title><ns>10</ns><id>93324</id><revision><id>631856</id><parentid>631623</parentid><timestamp>2013-01-20T16:24:41Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><text xml:space="preserve" bytes="4124">

{{#if:

 {{#ifeq:  | off
 |
 | yes{{
   #switch: Template
   | User
   | Template = yes
   }}
 }}

| Template:Fmbox }}{{#if:

 {{#switch: Mbox
 | doc
 | testcases = strange
 }}

| [[Category:Wikipedia pages with strange ((documentation)) usage|Template:Main otherTemplate:Mbox]]

}}</text><sha1>r3qht4u0hwps2mqnst3puyi8anb9dmz</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/end box2</title><ns>10</ns><id>124329</id><revision><id>688362</id><parentid>688359</parentid><timestamp>2013-05-11T09:36:55Z</timestamp><contributor><username>Shirayuki</username><id>472859</id></contributor><comment>Undo revision 688359 by Shirayuki (talk)</comment><text xml:space="preserve" bytes="864">Template:Documentation/end box</text><sha1>sfe0ppdpxp1nwfzhpym4jwdtmgpph1p</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/start box</title><ns>10</ns><id>93326</id><revision><id>742132</id><parentid>742131</parentid><timestamp>2013-07-20T14:04:29Z</timestamp><contributor><ip>81.129.86.23</ip></contributor><text xml:space="preserve" bytes="2002">

{{#ifeq: ¬ |

|

|
{{#switch: ¬
 | ¬ =   
   {{#switch: Template 
   | Template = File:Template-info.png Template documentation
   | Template:Ns:Module = File:Template-info.png Module documentation
   | File = Summary
   | #default = Documentation
   }}
 | #default = 
   
 }}{{
 #if: 
 | 
 | 
   {{
   #if: yes
   | [view] [edit] [history] [[[:Template:Purge]]] 
   | 
     [#if:  _        | %7B%7B%7Bpreload%7D%7D%7D_        | {{#ifeq: Template | File_          | Template:Documentation/preload-filespace_          | Template:Documentation/preload_          }} }} create]
   }}
}}

}}</text><sha1>linb792zr3zrp72qrhjkmqg1mz6uevr</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/start box2</title><ns>10</ns><id>93327</id><revision><id>631642</id><parentid>585737</parentid><timestamp>2013-01-20T15:55:27Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><minor/><comment>4 revisions from w:en:Template:Documentation/start box2: Requested by average_drifter in #mediawiki</comment><text xml:space="preserve" bytes="625">Template:Documentation/start box</text><sha1>t5j6y918odlsx0iuls0qgi6wbl050q3</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/template page</title><ns>10</ns><id>93328</id><revision><id>631644</id><parentid>557289</parentid><timestamp>2013-01-20T15:55:27Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><minor/><comment>1 revision from w:en:Template:Documentation/template page: Requested by average_drifter in #mediawiki</comment><text xml:space="preserve" bytes="232">{{#switch: Mbox | sandbox | testcases = Mbox | #default = Mbox }}</text><sha1>fenc3r6oe2sito28b1d8xgyo9gpq5uf</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation subpage</title><ns>10</ns><id>20806</id><revision><id>757428</id><parentid>715052</parentid><timestamp>2013-08-05T14:14:46Z</timestamp><contributor><username>IAlex</username><id>17961</id></contributor><minor/><comment>Reverted edits by 90.219.4.40 (talk) to last revision by Shirayuki</comment><text xml:space="preserve" bytes="2616">{{#if: |

File:Edit-paste.svg This is the template documentation page for Template:Mbox.
This page may not be intended to be viewed directly.
Links using variables may appear broken; do not replace these with hardcoded page names or URLs.
{{#if:x||

}} |{{#ifeq: mbox | doc

 | 

{{

   #ifeq: show | show
   | Template loop detected: Template:Mbox
   }}{{
   #if: 
   | 
   | {{#ifeq:Template|Template|}}
 }}

| }}

}}</text><sha1>7a3si8r4k2z0aqxpbbxz1c0gmny5pb9</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Fmbox</title><ns>10</ns><id>37655</id><revision><id>558796</id><parentid>558707</parentid><timestamp>2012-07-05T06:11:26Z</timestamp><contributor><username>Krinkle</username><id>135822</id></contributor><comment>update from enwiki</comment><text xml:space="preserve" bytes="1344"> {{#ifeq:|none | | }}

{{#if:

|

}}

{{#switch:warning

| | warning | editnotice | system =

| #default =
This message box is using an invalid "type=warning" parameter and needs fixing.
[[Category:Wikipedia message box parameter needs fixing|Template:Main otherTemplate:Mbox]]

}}</text><sha1>mrldgfpkjyqf89ukmq2vy7gh3ir2j7i</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Mbox/doc</title><ns>10</ns><id>45374</id><revision><id>659649</id><parentid>651771</parentid><timestamp>2013-03-14T09:07:42Z</timestamp><contributor><username>Krinkle</username><id>135822</id></contributor><text xml:space="preserve" bytes="14176">Template:Documentation subpage This is the Template:Tl or message box meta-template.

It is used to build message box templates such as Template:Tl. It offers several different colours, uses default images if no image parameter is given and it has some other features.

This meta-template uses the mbox CSS classes in MediaWiki:Common.css. The classes can also be used directly in a wikitable if special functionality is needed. See the how-to guide for that.

Usage

Simple usage example:

{{mbox | text = Some text.}}

Template loop detected: Template:Mbox Complex example:

{{mbox
| type       = style
| small      = left
| image      = [[File:Emblem-question-yellow.svg|40px|alt=Question mark]]
| smallimage = [[File:Emblem-question-yellow.svg|20px|alt=Question mark]]
| textstyle  = color: red; font-weight: bold; font-style: italic;
| text       = Text for a big box, for the top of articles.
| smalltext  = Text for the top of article sections.
}}

Template loop detected: Template:Mbox

But you are not really supposed to use red bold italic text.

Message box types

The following examples use different type parameters but use no image parameters thus they use the default images for each type.

Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox

Other images

The default images shown above are mostly for convenience. In many cases it is more appropriate to use more specific images. These examples use the image parameter to specify an image other than the default images.

Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox

More examples

Some other parameter combinations.

Template loop detected: Template:Mbox Template loop detected: Template:Mbox

Template loop detected: Template:Mbox

Template loop detected: Template:Mbox

Parameters

List of all parameters:

{{mbox
| type  = critical / serious / warning / notice / / move / protection
| image = none / [[File:...|40px|...]]
| imagewidth = width of image section / default is 52px
| imageright = [[File:...|40px|...]]
| imagerightwidth = width of right image section / default is 52px
| style = CSS values
| textstyle = CSS values
| text  = The message body text.
| small = {{{small|}}} / left
| smallimage = none / [[File:...|20px|...]]
| smallimageright = none / [[File:...|20px|...]]
| smalltext  = A shorter message body text.
}}

type

If no type parameter is given the template has a 'blank' style.

image

No parameter = If no image parameter is given the template uses a default image. Which default image it uses depends on the type parameter.
An image = Should be an image with usual wiki notation. Widths of 40px - 50px are usually about right. (Images over 52 pixels wide will cause padding problems, unless you also set imagewidth.)
Often an icon is purely decorative in the W3C sense that it repeats the text. To improve accessibility, it is desirable to not have it be announced by screen readers, as well as to avoid it linking to an irrelevant page. If (and only if) the image license allows this, it can be marked with "Template:ParaTemplate:Para". For example:
image = [[File:Unbalanced scales.svg|40px|link=|alt=]]
Conversely, an icon that does not use "Template:ParaTemplate:Para", and which therefore is announced to visually impaired readers, should use an "Template:Para" parameter that describes the icon. With no Template:Para parameter (using the default link), the alt text should describe the icon's visual appearance. For example:
image = [[File:Gnome globe current event.svg|40px|alt=Clock over a larger globe]]
With a nonempty "Template:Para" the alt text should describe the icon's function. For example:
image = [[File:Purple question mark.svg|40px|link=Special:Random|alt=Random article]]
An icon whose license requires attribution may have alt text, but must keep the default link. Although public domain images do not require a link, many licenses do require one. Please see Purely decorative images for more information about licensing.
none = Means that no image is used.
blank = This parameter is now deprecated. If you see it in use, change it to "image=none".

imagewidth

Optional CSS value used to set width of image's div section. Allowing you to use images wider than the default 52px wide.
Example
imagewidth=100px

imageright

No parameter = If no imageright parameter is given then no image is shown on the right side.
An image = Should be an image with usual wiki notation. 40px - 50px width are usually about right depending on the image height to width ratio. (Images over 52 pixels width will cause padding problems, unless you also set imagerightwidth.) For example:
imageright = [[File:Nuvola apps bookcase.png|40px|alt=Three stacked books]]
Anything = Any other object that you want to show on the right side.

imagerightwidth

Optional CSS value used to set width of image's div section. Allowing you to use images wider than the default 52px wide.
Example
imagerightwidth=100px

style

Optional CSS values used by the entire message box table. Without quotation marks " " but with the ending semicolons ;. For example:
style = margin-bottom: 0.5em;

textstyle

Optional CSS values used by the text cell. For example:
textstyle = text-align: center;

text

The message body text.

The small parameters

The small article message boxes are meant for the top of sections. Normally they should only contain one or two lines of text.

small

left = Makes it a smaller left aligned message box. This also makes the default images smaller. Note that any data fed to the smallimage, smallimageright and smalltext parameters is only used if "small=left". To make it so your template also understands the small parameter you can use this code:
small = {{{small|}}}

Template loop detected: Template:Mbox Template loop detected: Template:Mbox

smallimage

No parameter = If no smallimage parameter is given then this template falls back to use the image parameter. If the image parameter also is empty then a small default image is used.
An image = Should be an image with usual wiki notation. 20px width is usually about right for boxes with one line of text, while 25px width is usually about right for boxes with two lines of text. For example:
smallimage = [[File:Gnome globe current event.svg|20px|alt=Clock over a larger globe]]
none = Means that no image is used. This overrides any image fed to image, when "small=left".

Template loop detected: Template:Mbox

smallimageright

No parameter = If no smallimageright parameter is given then this template falls back to use the imageright parameter. If the imageright parameter also is empty then no image is shown on the right side.
An image = Should be an image with usual wiki notation. 20px - 25px width is usually about right. For example:
smallimageright = [[File:Nuvola apps bookcase.png|20px|alt=Three stacked books]]
Anything = Any other object that you want to show on the right side.
none = Means that no right side image is used. This overrides any image fed to imageright, when "small=left".

Template loop detected: Template:Mbox

smalltext

A shorter version of the message body text. If no smalltext parameter is given then this template falls back to use the text parameter.

Technical details

If you need to use special characters in the text parameter then you need to escape them like this:

{{mbox
| text  = <div>
Equal sign = and a start and end brace { } work fine as they are.
But here is a pipe &#124; and two end braces <nowiki>}}</nowiki>.
And now a pipe and end braces <nowiki>|}}</nowiki>.
</div>
}}

Template loop detected: Template:Mbox

The <div> tags that surround the text in the example above are usually not needed. But if the text contains line breaks then sometimes we get weird line spacing. This especially happens when using vertical dotted lists. Then use the div tags to fix that.

This template uses CSS classes in MediaWiki:Common.css for most of its looks, thus it is fully skinnable.

This template calls Template:Tl which holds most of the code for Template:Tl, while Template:Tl itself does parameter preprocessing.

Internally this meta-template uses HTML wikimarkup instead of wikimarkup for the table code. That is the usual way we make meta-templates since wikimarkup has several drawbacks. For instance it makes it harder to use parser functions and some special characters in parameters.

The default images for this meta-template are in png format instead of svg format. The main reason is that some older web browsers have trouble with the transparent background that MediaWiki renders for svg images. The png images here have hand optimised transparent background colour so they look good in all browsers. Note that svg icons only look somewhat bad in the old browsers, thus such hand optimisation is only worth the trouble for very widely used icons.

For more technical details see the talk page and the "See also" links below.

See also

Template:Mbox templates Other pages:

</text><sha1>5cafb545bbublgg4mei08dvwxs9zay9</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Mbox templates</title><ns>10</ns><id>95150</id><revision><id>692773</id><parentid>565939</parentid><timestamp>2013-05-21T16:37:34Z</timestamp><contributor><ip>90.209.78.127</ip></contributor><text xml:space="preserve" bytes="268">Template:Nmbox</text><sha1>mm2hquqpmw1k85xftye00jkid2a0l4u</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Namespace detect</title><ns>10</ns><id>79689</id><revision><id>695915</id><parentid>497627</parentid><timestamp>2013-05-27T09:23:36Z</timestamp><contributor><ip>81.129.84.113</ip></contributor><text xml:space="preserve" bytes="1470">{{#switch:

 {{#if: 
   | {{{demospace}}}
   | {{#if: 
     | 
       {{#ifeq:|
       | talk
       |  
       }}
     | 
       {{#ifeq:template|template talk
       | talk
       | template 
       }}
     }}
   }}

| main | = | talk = | user = | project = | file | image = | mediawiki = | template = | help = | category = | book = | extension = | other | #default =

}}</text><sha1>qry2n28n1p12gxaxgu7gs1bkzywbpqv</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Nmbox</title><ns>10</ns><id>47495</id><revision><id>556782</id><parentid>328128</parentid><timestamp>2012-06-29T10:35:15Z</timestamp><contributor><username>Krinkle</username><id>135822</id></contributor><text xml:space="preserve" bytes="587"> {{#if: | |

}}

type=warning – Other problems, such as Template:Tl.
</text><sha1>6k7jc6wiy6i7qy82dd4dw1xja6e8k5w</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Ombox</title><ns>10</ns><id>93344</id><revision><id>634878</id><parentid>634793</parentid><timestamp>2013-01-25T22:39:30Z</timestamp><contributor><username>Kaldari</username><id>31661</id></contributor><comment>reverting breakage</comment><text xml:space="preserve" bytes="723">{{#ifeq:|yes

| Template:Ombox/core | Template:Ombox/core

}}</text><sha1>p9vh00dqvq0u1q3950ueg6abd93dyrt</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Ombox/core</title><ns>10</ns><id>93345</id><revision><id>680423</id><parentid>680422</parentid><timestamp>2013-04-29T09:31:02Z</timestamp><contributor><username>Siebrand</username><id>5665</id></contributor><minor/><comment>Protected "Template:Ombox/core": Highly visible template ([Edit=Allow only autoconfirmed users] (indefinite) [Move=Allow only autoconfirmed users] (indefinite))</comment><text xml:space="preserve" bytes="2250"> {{#ifeq:|none | | }}

{{#if: | {{#ifeq:|none

 | 
|
 }}

}}

{{#switch:warning

| | critical | important | warning | caution | license | speedy | delete | content | style | move | protection | notice =

| #default =
This message box is using an invalid "type=warning" parameter and needs fixing.
[[Category:Wikipedia message box parameter needs fixing|Template:Main otherTemplate:Mbox]]

}}</text><sha1>l3n9mp2c6ch14gekpe1oxxe8thp3xdb</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Para</title><ns>10</ns><id>40658</id><revision><id>557339</id><parentid>557338</parentid><timestamp>2012-06-30T23:27:18Z</timestamp><contributor><username>Reedy</username><id>28424</id></contributor><minor/><comment>1 revision from w:en:Template:Para</comment><text xml:space="preserve" bytes="238">|{{#if:|{{{1}}}=|}}</text><sha1>3ve3qhqjaafu9wuy6em7y1fz49qyqfx</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Purge</title><ns>10</ns><id>31341</id><revision><id>405355</id><parentid>405354</parentid><timestamp>2011-05-24T01:39:17Z</timestamp><contributor><username>Peachey88</username><id>31302</id></contributor><minor/><comment>1 revision from w:en:Template:Purge: update to en.wiki</comment><text xml:space="preserve" bytes="197">Purge</text><sha1>830osaj62tvmlh6zq374ixtzbukxcih</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Tl</title><ns>10</ns><id>12644</id><redirect title="Template:Tlx"/><revision><id>760820</id><parentid>760712</parentid><timestamp>2013-08-10T10:29:27Z</timestamp><contributor><username>IAlex</username><id>17961</id></contributor><minor/><comment>Reverted edits by 175.200.179.56 (talk) to last revision by Varnent</comment><text xml:space="preserve" bytes="25">#REDIRECTTemplate:Tlx</text><sha1>avv0qklcaxr8n5r45lcc2x17y9w78sc</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Tlx</title><ns>10</ns><id>20809</id><revision><id>557363</id><parentid>534113</parentid><timestamp>2012-06-30T23:27:22Z</timestamp><contributor><username>Reedy</username><id>28424</id></contributor><minor/><comment>1 revision from w:en:Template:Tlx</comment><text xml:space="preserve" bytes="385">{{[[Template:|]]{{#if:| |{{{2}}} }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}}</text><sha1>0d6b5bkc7j2tegvw2yzm4b6iil98xqg</sha1> <mediawiki xsi:schemaLocation="http://www.mediawiki.org/xml/export-0.8/ http://www.mediawiki.org/xml/export-0.8.xsd" version="0.8" xml:lang="en"><siteinfo><sitename>MediaWiki</sitename><base>http://www.mediawiki.org/wiki/MediaWiki</base><generator>MediaWiki 1.22wmf12</generator><case>first-letter</case><namespaces><namespace key="-2" case="first-letter">Media</namespace><namespace key="-1" case="first-letter">Special</namespace><namespace key="0" case="first-letter"/><namespace key="1" case="first-letter">Talk</namespace><namespace key="2" case="first-letter">User</namespace><namespace key="3" case="first-letter">User talk</namespace><namespace key="4" case="first-letter">Project</namespace><namespace key="5" case="first-letter">Project talk</namespace><namespace key="6" case="first-letter">File</namespace><namespace key="7" case="first-letter">File talk</namespace><namespace key="8" case="first-letter">MediaWiki</namespace><namespace key="9" case="first-letter">MediaWiki talk</namespace><namespace key="10" case="first-letter">Template</namespace><namespace key="11" case="first-letter">Template talk</namespace><namespace key="12" case="first-letter">Help</namespace><namespace key="13" case="first-letter">Help talk</namespace><namespace key="14" case="first-letter">Category</namespace><namespace key="15" case="first-letter">Category talk</namespace><namespace key="90" case="first-letter">Thread</namespace><namespace key="91" case="first-letter">Thread talk</namespace><namespace key="92" case="first-letter">Summary</namespace><namespace key="93" case="first-letter">Summary talk</namespace><namespace key="100" case="first-letter">Manual</namespace><namespace key="101" case="first-letter">Manual talk</namespace><namespace key="102" case="first-letter">Extension</namespace><namespace key="103" case="first-letter">Extension talk</namespace><namespace key="104" case="first-letter">API</namespace><namespace key="105" case="first-letter">API talk</namespace><namespace key="106" case="first-letter">Skin</namespace><namespace key="107" case="first-letter">Skin talk</namespace><namespace key="828" case="first-letter">Module</namespace><namespace key="829" case="first-letter">Module talk</namespace><namespace key="1198" case="first-letter">Translations</namespace><namespace key="1199" case="first-letter">Translations talk</namespace><namespace key="2500" case="first-letter">VisualEditor</namespace><namespace key="2501" case="first-letter">VisualEditor talk</namespace></namespaces></siteinfo><page><title>Template:Mbox</title><ns>10</ns><id>45372</id><revision><id>634882</id><parentid>634876</parentid><timestamp>2013-01-25T22:40:38Z</timestamp><contributor><username>Kaldari</username><id>31661</id></contributor><comment>reverting self, problem was in ombox template</comment><text xml:space="preserve" bytes="707">{{

 Template:Namespace detect

| type = caution | image = | imageright = | class = | style = | textstyle = | text = type=caution – Points of concern, but not so serious, such as Template:Tl and Template:Tl. | small = | smallimage = | smallimageright = | smalltext = | subst = | date = | name = }}</text><sha1>40w6e1mdq2t695t9dv143e1rzq5pv1o</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation</title><ns>10</ns><id>20803</id><revision><id>688512</id><parentid>687083</parentid><timestamp>2013-05-11T17:18:34Z</timestamp><contributor><username>Wargo</username><id>25061</id></contributor><text xml:space="preserve" bytes="2079">{{#ifeq: Mbox | sandbox

|
Template:Template sandbox notice

}}Template:Documentation/start box2 {{#switch: {{#if:|1|0}}{{#if:|1|0}}{{#ifexist:|1|0}}{{#ifexist:Template:Documentation/docspace:Template:Documentation/template page/doc|1|0}} | 1000 | 1001 | 1010 | 1011 | 1100 | 1101 | 1110 | 1111 = | 0110 | 0111 = {{ {{{1}}} }} | 0001 | 0011 = {{ Template:Documentation/docspace:Template:Documentation/template page/doc }} | 0000 | 0100 | 0010 | 0101 = }} Template:Documentation/end box2</text><sha1>bvikrz5412m4gizkphh8ftj604e3kbf</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/docspace</title><ns>10</ns><id>93323</id><revision><id>631615</id><parentid>557279</parentid><timestamp>2013-01-20T15:55:26Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><minor/><comment>1 revision from w:en:Template:Documentation/docspace: Requested by average_drifter in #mediawiki</comment><text xml:space="preserve" bytes="302">{{#switch: Template

 | 
 | File
 | MediaWiki
 | Category = Template talk
 | #default = Template
}}</text><sha1>7f8iymss9sr4v7f4t5pza1arwjogrv3</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/end box</title><ns>10</ns><id>93324</id><revision><id>631856</id><parentid>631623</parentid><timestamp>2013-01-20T16:24:41Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><text xml:space="preserve" bytes="4124">

{{#if:

 {{#ifeq:  | off
 |
 | yes{{
   #switch: Template
   | User
   | Template = yes
   }}
 }}

| Template:Fmbox }}{{#if:

 {{#switch: Mbox
 | doc
 | testcases = strange
 }}

| [[Category:Wikipedia pages with strange ((documentation)) usage|Template:Main otherTemplate:Mbox]]

}}</text><sha1>r3qht4u0hwps2mqnst3puyi8anb9dmz</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/end box2</title><ns>10</ns><id>124329</id><revision><id>688362</id><parentid>688359</parentid><timestamp>2013-05-11T09:36:55Z</timestamp><contributor><username>Shirayuki</username><id>472859</id></contributor><comment>Undo revision 688359 by Shirayuki (talk)</comment><text xml:space="preserve" bytes="864">Template:Documentation/end box</text><sha1>sfe0ppdpxp1nwfzhpym4jwdtmgpph1p</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/start box</title><ns>10</ns><id>93326</id><revision><id>742132</id><parentid>742131</parentid><timestamp>2013-07-20T14:04:29Z</timestamp><contributor><ip>81.129.86.23</ip></contributor><text xml:space="preserve" bytes="2002">

{{#ifeq: ¬ |

|

|
{{#switch: ¬
 | ¬ =   
   {{#switch: Template 
   | Template = File:Template-info.png Template documentation
   | Template:Ns:Module = File:Template-info.png Module documentation
   | File = Summary
   | #default = Documentation
   }}
 | #default = 
   
 }}{{
 #if: 
 | 
 | 
   {{
   #if: yes
   | [view] [edit] [history] [[[:Template:Purge]]] 
   | 
     [#if:  _        | %7B%7B%7Bpreload%7D%7D%7D_        | {{#ifeq: Template | File_          | Template:Documentation/preload-filespace_          | Template:Documentation/preload_          }} }} create]
   }}
}}

}}</text><sha1>linb792zr3zrp72qrhjkmqg1mz6uevr</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/start box2</title><ns>10</ns><id>93327</id><revision><id>631642</id><parentid>585737</parentid><timestamp>2013-01-20T15:55:27Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><minor/><comment>4 revisions from w:en:Template:Documentation/start box2: Requested by average_drifter in #mediawiki</comment><text xml:space="preserve" bytes="625">Template:Documentation/start box</text><sha1>t5j6y918odlsx0iuls0qgi6wbl050q3</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/template page</title><ns>10</ns><id>93328</id><revision><id>631644</id><parentid>557289</parentid><timestamp>2013-01-20T15:55:27Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><minor/><comment>1 revision from w:en:Template:Documentation/template page: Requested by average_drifter in #mediawiki</comment><text xml:space="preserve" bytes="232">{{#switch: Mbox | sandbox | testcases = Mbox | #default = Mbox }}</text><sha1>fenc3r6oe2sito28b1d8xgyo9gpq5uf</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation subpage</title><ns>10</ns><id>20806</id><revision><id>757428</id><parentid>715052</parentid><timestamp>2013-08-05T14:14:46Z</timestamp><contributor><username>IAlex</username><id>17961</id></contributor><minor/><comment>Reverted edits by 90.219.4.40 (talk) to last revision by Shirayuki</comment><text xml:space="preserve" bytes="2616">{{#if: |

File:Edit-paste.svg This is the template documentation page for Template:Mbox.
This page may not be intended to be viewed directly.
Links using variables may appear broken; do not replace these with hardcoded page names or URLs.
{{#if:x||

}} |{{#ifeq: mbox | doc

 | 

{{

   #ifeq: show | show
   | Template loop detected: Template:Mbox
   }}{{
   #if: 
   | 
   | {{#ifeq:Template|Template|}}
 }}

| }}

}}</text><sha1>7a3si8r4k2z0aqxpbbxz1c0gmny5pb9</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Fmbox</title><ns>10</ns><id>37655</id><revision><id>558796</id><parentid>558707</parentid><timestamp>2012-07-05T06:11:26Z</timestamp><contributor><username>Krinkle</username><id>135822</id></contributor><comment>update from enwiki</comment><text xml:space="preserve" bytes="1344"> {{#ifeq:|none | | }}

{{#if:

|

}}

{{#switch:caution

| | warning | editnotice | system =

| #default =
This message box is using an invalid "type=caution" parameter and needs fixing.
[[Category:Wikipedia message box parameter needs fixing|Template:Main otherTemplate:Mbox]]

}}</text><sha1>mrldgfpkjyqf89ukmq2vy7gh3ir2j7i</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Mbox/doc</title><ns>10</ns><id>45374</id><revision><id>659649</id><parentid>651771</parentid><timestamp>2013-03-14T09:07:42Z</timestamp><contributor><username>Krinkle</username><id>135822</id></contributor><text xml:space="preserve" bytes="14176">Template:Documentation subpage This is the Template:Tl or message box meta-template.

It is used to build message box templates such as Template:Tl. It offers several different colours, uses default images if no image parameter is given and it has some other features.

This meta-template uses the mbox CSS classes in MediaWiki:Common.css. The classes can also be used directly in a wikitable if special functionality is needed. See the how-to guide for that.

Usage

Simple usage example:

{{mbox | text = Some text.}}

Template loop detected: Template:Mbox Complex example:

{{mbox
| type       = style
| small      = left
| image      = [[File:Emblem-question-yellow.svg|40px|alt=Question mark]]
| smallimage = [[File:Emblem-question-yellow.svg|20px|alt=Question mark]]
| textstyle  = color: red; font-weight: bold; font-style: italic;
| text       = Text for a big box, for the top of articles.
| smalltext  = Text for the top of article sections.
}}

Template loop detected: Template:Mbox

But you are not really supposed to use red bold italic text.

Message box types

The following examples use different type parameters but use no image parameters thus they use the default images for each type.

Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox

Other images

The default images shown above are mostly for convenience. In many cases it is more appropriate to use more specific images. These examples use the image parameter to specify an image other than the default images.

Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox

More examples

Some other parameter combinations.

Template loop detected: Template:Mbox Template loop detected: Template:Mbox

Template loop detected: Template:Mbox

Template loop detected: Template:Mbox

Parameters

List of all parameters:

{{mbox
| type  = critical / serious / warning / notice / / move / protection
| image = none / [[File:...|40px|...]]
| imagewidth = width of image section / default is 52px
| imageright = [[File:...|40px|...]]
| imagerightwidth = width of right image section / default is 52px
| style = CSS values
| textstyle = CSS values
| text  = The message body text.
| small = {{{small|}}} / left
| smallimage = none / [[File:...|20px|...]]
| smallimageright = none / [[File:...|20px|...]]
| smalltext  = A shorter message body text.
}}

type

If no type parameter is given the template has a 'blank' style.

image

No parameter = If no image parameter is given the template uses a default image. Which default image it uses depends on the type parameter.
An image = Should be an image with usual wiki notation. Widths of 40px - 50px are usually about right. (Images over 52 pixels wide will cause padding problems, unless you also set imagewidth.)
Often an icon is purely decorative in the W3C sense that it repeats the text. To improve accessibility, it is desirable to not have it be announced by screen readers, as well as to avoid it linking to an irrelevant page. If (and only if) the image license allows this, it can be marked with "Template:ParaTemplate:Para". For example:
image = [[File:Unbalanced scales.svg|40px|link=|alt=]]
Conversely, an icon that does not use "Template:ParaTemplate:Para", and which therefore is announced to visually impaired readers, should use an "Template:Para" parameter that describes the icon. With no Template:Para parameter (using the default link), the alt text should describe the icon's visual appearance. For example:
image = [[File:Gnome globe current event.svg|40px|alt=Clock over a larger globe]]
With a nonempty "Template:Para" the alt text should describe the icon's function. For example:
image = [[File:Purple question mark.svg|40px|link=Special:Random|alt=Random article]]
An icon whose license requires attribution may have alt text, but must keep the default link. Although public domain images do not require a link, many licenses do require one. Please see Purely decorative images for more information about licensing.
none = Means that no image is used.
blank = This parameter is now deprecated. If you see it in use, change it to "image=none".

imagewidth

Optional CSS value used to set width of image's div section. Allowing you to use images wider than the default 52px wide.
Example
imagewidth=100px

imageright

No parameter = If no imageright parameter is given then no image is shown on the right side.
An image = Should be an image with usual wiki notation. 40px - 50px width are usually about right depending on the image height to width ratio. (Images over 52 pixels width will cause padding problems, unless you also set imagerightwidth.) For example:
imageright = [[File:Nuvola apps bookcase.png|40px|alt=Three stacked books]]
Anything = Any other object that you want to show on the right side.

imagerightwidth

Optional CSS value used to set width of image's div section. Allowing you to use images wider than the default 52px wide.
Example
imagerightwidth=100px

style

Optional CSS values used by the entire message box table. Without quotation marks " " but with the ending semicolons ;. For example:
style = margin-bottom: 0.5em;

textstyle

Optional CSS values used by the text cell. For example:
textstyle = text-align: center;

text

The message body text.

The small parameters

The small article message boxes are meant for the top of sections. Normally they should only contain one or two lines of text.

small

left = Makes it a smaller left aligned message box. This also makes the default images smaller. Note that any data fed to the smallimage, smallimageright and smalltext parameters is only used if "small=left". To make it so your template also understands the small parameter you can use this code:
small = {{{small|}}}

Template loop detected: Template:Mbox Template loop detected: Template:Mbox

smallimage

No parameter = If no smallimage parameter is given then this template falls back to use the image parameter. If the image parameter also is empty then a small default image is used.
An image = Should be an image with usual wiki notation. 20px width is usually about right for boxes with one line of text, while 25px width is usually about right for boxes with two lines of text. For example:
smallimage = [[File:Gnome globe current event.svg|20px|alt=Clock over a larger globe]]
none = Means that no image is used. This overrides any image fed to image, when "small=left".

Template loop detected: Template:Mbox

smallimageright

No parameter = If no smallimageright parameter is given then this template falls back to use the imageright parameter. If the imageright parameter also is empty then no image is shown on the right side.
An image = Should be an image with usual wiki notation. 20px - 25px width is usually about right. For example:
smallimageright = [[File:Nuvola apps bookcase.png|20px|alt=Three stacked books]]
Anything = Any other object that you want to show on the right side.
none = Means that no right side image is used. This overrides any image fed to imageright, when "small=left".

Template loop detected: Template:Mbox

smalltext

A shorter version of the message body text. If no smalltext parameter is given then this template falls back to use the text parameter.

Technical details

If you need to use special characters in the text parameter then you need to escape them like this:

{{mbox
| text  = <div>
Equal sign = and a start and end brace { } work fine as they are.
But here is a pipe &#124; and two end braces <nowiki>}}</nowiki>.
And now a pipe and end braces <nowiki>|}}</nowiki>.
</div>
}}

Template loop detected: Template:Mbox

The <div> tags that surround the text in the example above are usually not needed. But if the text contains line breaks then sometimes we get weird line spacing. This especially happens when using vertical dotted lists. Then use the div tags to fix that.

This template uses CSS classes in MediaWiki:Common.css for most of its looks, thus it is fully skinnable.

This template calls Template:Tl which holds most of the code for Template:Tl, while Template:Tl itself does parameter preprocessing.

Internally this meta-template uses HTML wikimarkup instead of wikimarkup for the table code. That is the usual way we make meta-templates since wikimarkup has several drawbacks. For instance it makes it harder to use parser functions and some special characters in parameters.

The default images for this meta-template are in png format instead of svg format. The main reason is that some older web browsers have trouble with the transparent background that MediaWiki renders for svg images. The png images here have hand optimised transparent background colour so they look good in all browsers. Note that svg icons only look somewhat bad in the old browsers, thus such hand optimisation is only worth the trouble for very widely used icons.

For more technical details see the talk page and the "See also" links below.

See also

Template:Mbox templates Other pages:

</text><sha1>5cafb545bbublgg4mei08dvwxs9zay9</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Mbox templates</title><ns>10</ns><id>95150</id><revision><id>692773</id><parentid>565939</parentid><timestamp>2013-05-21T16:37:34Z</timestamp><contributor><ip>90.209.78.127</ip></contributor><text xml:space="preserve" bytes="268">Template:Nmbox</text><sha1>mm2hquqpmw1k85xftye00jkid2a0l4u</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Namespace detect</title><ns>10</ns><id>79689</id><revision><id>695915</id><parentid>497627</parentid><timestamp>2013-05-27T09:23:36Z</timestamp><contributor><ip>81.129.84.113</ip></contributor><text xml:space="preserve" bytes="1470">{{#switch:

 {{#if: 
   | {{{demospace}}}
   | {{#if: 
     | 
       {{#ifeq:|
       | talk
       |  
       }}
     | 
       {{#ifeq:template|template talk
       | talk
       | template 
       }}
     }}
   }}

| main | = | talk = | user = | project = | file | image = | mediawiki = | template = | help = | category = | book = | extension = | other | #default =

}}</text><sha1>qry2n28n1p12gxaxgu7gs1bkzywbpqv</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Nmbox</title><ns>10</ns><id>47495</id><revision><id>556782</id><parentid>328128</parentid><timestamp>2012-06-29T10:35:15Z</timestamp><contributor><username>Krinkle</username><id>135822</id></contributor><text xml:space="preserve" bytes="587"> {{#if: | |

}}

type=caution – Points of concern, but not so serious, such as Template:Tl and Template:Tl.
</text><sha1>6k7jc6wiy6i7qy82dd4dw1xja6e8k5w</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Ombox</title><ns>10</ns><id>93344</id><revision><id>634878</id><parentid>634793</parentid><timestamp>2013-01-25T22:39:30Z</timestamp><contributor><username>Kaldari</username><id>31661</id></contributor><comment>reverting breakage</comment><text xml:space="preserve" bytes="723">{{#ifeq:|yes

| Template:Ombox/core | Template:Ombox/core

}}</text><sha1>p9vh00dqvq0u1q3950ueg6abd93dyrt</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Ombox/core</title><ns>10</ns><id>93345</id><revision><id>680423</id><parentid>680422</parentid><timestamp>2013-04-29T09:31:02Z</timestamp><contributor><username>Siebrand</username><id>5665</id></contributor><minor/><comment>Protected "Template:Ombox/core": Highly visible template ([Edit=Allow only autoconfirmed users] (indefinite) [Move=Allow only autoconfirmed users] (indefinite))</comment><text xml:space="preserve" bytes="2250"> {{#ifeq:|none | | }}

{{#if: | {{#ifeq:|none

 | 
|
 }}

}}

{{#switch:caution

| | critical | important | warning | caution | license | speedy | delete | content | style | move | protection | notice =

| #default =
This message box is using an invalid "type=caution" parameter and needs fixing.
[[Category:Wikipedia message box parameter needs fixing|Template:Main otherTemplate:Mbox]]

}}</text><sha1>l3n9mp2c6ch14gekpe1oxxe8thp3xdb</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Para</title><ns>10</ns><id>40658</id><revision><id>557339</id><parentid>557338</parentid><timestamp>2012-06-30T23:27:18Z</timestamp><contributor><username>Reedy</username><id>28424</id></contributor><minor/><comment>1 revision from w:en:Template:Para</comment><text xml:space="preserve" bytes="238">|{{#if:|{{{1}}}=|}}</text><sha1>3ve3qhqjaafu9wuy6em7y1fz49qyqfx</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Purge</title><ns>10</ns><id>31341</id><revision><id>405355</id><parentid>405354</parentid><timestamp>2011-05-24T01:39:17Z</timestamp><contributor><username>Peachey88</username><id>31302</id></contributor><minor/><comment>1 revision from w:en:Template:Purge: update to en.wiki</comment><text xml:space="preserve" bytes="197">Purge</text><sha1>830osaj62tvmlh6zq374ixtzbukxcih</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Tl</title><ns>10</ns><id>12644</id><redirect title="Template:Tlx"/><revision><id>760820</id><parentid>760712</parentid><timestamp>2013-08-10T10:29:27Z</timestamp><contributor><username>IAlex</username><id>17961</id></contributor><minor/><comment>Reverted edits by 175.200.179.56 (talk) to last revision by Varnent</comment><text xml:space="preserve" bytes="25">#REDIRECTTemplate:Tlx</text><sha1>avv0qklcaxr8n5r45lcc2x17y9w78sc</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Tlx</title><ns>10</ns><id>20809</id><revision><id>557363</id><parentid>534113</parentid><timestamp>2012-06-30T23:27:22Z</timestamp><contributor><username>Reedy</username><id>28424</id></contributor><minor/><comment>1 revision from w:en:Template:Tlx</comment><text xml:space="preserve" bytes="385">{{[[Template:|]]{{#if:| |{{{2}}} }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}}</text><sha1>0d6b5bkc7j2tegvw2yzm4b6iil98xqg</sha1> <mediawiki xsi:schemaLocation="http://www.mediawiki.org/xml/export-0.8/ http://www.mediawiki.org/xml/export-0.8.xsd" version="0.8" xml:lang="en"><siteinfo><sitename>MediaWiki</sitename><base>http://www.mediawiki.org/wiki/MediaWiki</base><generator>MediaWiki 1.22wmf12</generator><case>first-letter</case><namespaces><namespace key="-2" case="first-letter">Media</namespace><namespace key="-1" case="first-letter">Special</namespace><namespace key="0" case="first-letter"/><namespace key="1" case="first-letter">Talk</namespace><namespace key="2" case="first-letter">User</namespace><namespace key="3" case="first-letter">User talk</namespace><namespace key="4" case="first-letter">Project</namespace><namespace key="5" case="first-letter">Project talk</namespace><namespace key="6" case="first-letter">File</namespace><namespace key="7" case="first-letter">File talk</namespace><namespace key="8" case="first-letter">MediaWiki</namespace><namespace key="9" case="first-letter">MediaWiki talk</namespace><namespace key="10" case="first-letter">Template</namespace><namespace key="11" case="first-letter">Template talk</namespace><namespace key="12" case="first-letter">Help</namespace><namespace key="13" case="first-letter">Help talk</namespace><namespace key="14" case="first-letter">Category</namespace><namespace key="15" case="first-letter">Category talk</namespace><namespace key="90" case="first-letter">Thread</namespace><namespace key="91" case="first-letter">Thread talk</namespace><namespace key="92" case="first-letter">Summary</namespace><namespace key="93" case="first-letter">Summary talk</namespace><namespace key="100" case="first-letter">Manual</namespace><namespace key="101" case="first-letter">Manual talk</namespace><namespace key="102" case="first-letter">Extension</namespace><namespace key="103" case="first-letter">Extension talk</namespace><namespace key="104" case="first-letter">API</namespace><namespace key="105" case="first-letter">API talk</namespace><namespace key="106" case="first-letter">Skin</namespace><namespace key="107" case="first-letter">Skin talk</namespace><namespace key="828" case="first-letter">Module</namespace><namespace key="829" case="first-letter">Module talk</namespace><namespace key="1198" case="first-letter">Translations</namespace><namespace key="1199" case="first-letter">Translations talk</namespace><namespace key="2500" case="first-letter">VisualEditor</namespace><namespace key="2501" case="first-letter">VisualEditor talk</namespace></namespaces></siteinfo><page><title>Template:Mbox</title><ns>10</ns><id>45372</id><revision><id>634882</id><parentid>634876</parentid><timestamp>2013-01-25T22:40:38Z</timestamp><contributor><username>Kaldari</username><id>31661</id></contributor><comment>reverting self, problem was in ombox template</comment><text xml:space="preserve" bytes="707">{{

 Template:Namespace detect

| type = notice | image = | imageright = | class = | style = | textstyle = | text = type=notice – Points of information, such as Template:Tl. | small = | smallimage = | smallimageright = | smalltext = | subst = | date = | name = }}</text><sha1>40w6e1mdq2t695t9dv143e1rzq5pv1o</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation</title><ns>10</ns><id>20803</id><revision><id>688512</id><parentid>687083</parentid><timestamp>2013-05-11T17:18:34Z</timestamp><contributor><username>Wargo</username><id>25061</id></contributor><text xml:space="preserve" bytes="2079">{{#ifeq: Mbox | sandbox

|
Template:Template sandbox notice

}}Template:Documentation/start box2 {{#switch: {{#if:|1|0}}{{#if:|1|0}}{{#ifexist:|1|0}}{{#ifexist:Template:Documentation/docspace:Template:Documentation/template page/doc|1|0}} | 1000 | 1001 | 1010 | 1011 | 1100 | 1101 | 1110 | 1111 = | 0110 | 0111 = {{ {{{1}}} }} | 0001 | 0011 = {{ Template:Documentation/docspace:Template:Documentation/template page/doc }} | 0000 | 0100 | 0010 | 0101 = }} Template:Documentation/end box2</text><sha1>bvikrz5412m4gizkphh8ftj604e3kbf</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/docspace</title><ns>10</ns><id>93323</id><revision><id>631615</id><parentid>557279</parentid><timestamp>2013-01-20T15:55:26Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><minor/><comment>1 revision from w:en:Template:Documentation/docspace: Requested by average_drifter in #mediawiki</comment><text xml:space="preserve" bytes="302">{{#switch: Template

 | 
 | File
 | MediaWiki
 | Category = Template talk
 | #default = Template
}}</text><sha1>7f8iymss9sr4v7f4t5pza1arwjogrv3</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/end box</title><ns>10</ns><id>93324</id><revision><id>631856</id><parentid>631623</parentid><timestamp>2013-01-20T16:24:41Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><text xml:space="preserve" bytes="4124">

{{#if:

 {{#ifeq:  | off
 |
 | yes{{
   #switch: Template
   | User
   | Template = yes
   }}
 }}

| Template:Fmbox }}{{#if:

 {{#switch: Mbox
 | doc
 | testcases = strange
 }}

| [[Category:Wikipedia pages with strange ((documentation)) usage|Template:Main otherTemplate:Mbox]]

}}</text><sha1>r3qht4u0hwps2mqnst3puyi8anb9dmz</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/end box2</title><ns>10</ns><id>124329</id><revision><id>688362</id><parentid>688359</parentid><timestamp>2013-05-11T09:36:55Z</timestamp><contributor><username>Shirayuki</username><id>472859</id></contributor><comment>Undo revision 688359 by Shirayuki (talk)</comment><text xml:space="preserve" bytes="864">Template:Documentation/end box</text><sha1>sfe0ppdpxp1nwfzhpym4jwdtmgpph1p</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/start box</title><ns>10</ns><id>93326</id><revision><id>742132</id><parentid>742131</parentid><timestamp>2013-07-20T14:04:29Z</timestamp><contributor><ip>81.129.86.23</ip></contributor><text xml:space="preserve" bytes="2002">

{{#ifeq: ¬ |

|

|
{{#switch: ¬
 | ¬ =   
   {{#switch: Template 
   | Template = File:Template-info.png Template documentation
   | Template:Ns:Module = File:Template-info.png Module documentation
   | File = Summary
   | #default = Documentation
   }}
 | #default = 
   
 }}{{
 #if: 
 | 
 | 
   {{
   #if: yes
   | [view] [edit] [history] [[[:Template:Purge]]] 
   | 
     [#if:  _        | %7B%7B%7Bpreload%7D%7D%7D_        | {{#ifeq: Template | File_          | Template:Documentation/preload-filespace_          | Template:Documentation/preload_          }} }} create]
   }}
}}

}}</text><sha1>linb792zr3zrp72qrhjkmqg1mz6uevr</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/start box2</title><ns>10</ns><id>93327</id><revision><id>631642</id><parentid>585737</parentid><timestamp>2013-01-20T15:55:27Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><minor/><comment>4 revisions from w:en:Template:Documentation/start box2: Requested by average_drifter in #mediawiki</comment><text xml:space="preserve" bytes="625">Template:Documentation/start box</text><sha1>t5j6y918odlsx0iuls0qgi6wbl050q3</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/template page</title><ns>10</ns><id>93328</id><revision><id>631644</id><parentid>557289</parentid><timestamp>2013-01-20T15:55:27Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><minor/><comment>1 revision from w:en:Template:Documentation/template page: Requested by average_drifter in #mediawiki</comment><text xml:space="preserve" bytes="232">{{#switch: Mbox | sandbox | testcases = Mbox | #default = Mbox }}</text><sha1>fenc3r6oe2sito28b1d8xgyo9gpq5uf</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation subpage</title><ns>10</ns><id>20806</id><revision><id>757428</id><parentid>715052</parentid><timestamp>2013-08-05T14:14:46Z</timestamp><contributor><username>IAlex</username><id>17961</id></contributor><minor/><comment>Reverted edits by 90.219.4.40 (talk) to last revision by Shirayuki</comment><text xml:space="preserve" bytes="2616">{{#if: |

File:Edit-paste.svg This is the template documentation page for Template:Mbox.
This page may not be intended to be viewed directly.
Links using variables may appear broken; do not replace these with hardcoded page names or URLs.
{{#if:x||

}} |{{#ifeq: mbox | doc

 | 

{{

   #ifeq: show | show
   | Template loop detected: Template:Mbox
   }}{{
   #if: 
   | 
   | {{#ifeq:Template|Template|}}
 }}

| }}

}}</text><sha1>7a3si8r4k2z0aqxpbbxz1c0gmny5pb9</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Fmbox</title><ns>10</ns><id>37655</id><revision><id>558796</id><parentid>558707</parentid><timestamp>2012-07-05T06:11:26Z</timestamp><contributor><username>Krinkle</username><id>135822</id></contributor><comment>update from enwiki</comment><text xml:space="preserve" bytes="1344"> {{#ifeq:|none | | }}

{{#if:

|

}}

{{#switch:notice

| | warning | editnotice | system =

| #default =
This message box is using an invalid "type=notice" parameter and needs fixing.
[[Category:Wikipedia message box parameter needs fixing|Template:Main otherTemplate:Mbox]]

}}</text><sha1>mrldgfpkjyqf89ukmq2vy7gh3ir2j7i</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Mbox/doc</title><ns>10</ns><id>45374</id><revision><id>659649</id><parentid>651771</parentid><timestamp>2013-03-14T09:07:42Z</timestamp><contributor><username>Krinkle</username><id>135822</id></contributor><text xml:space="preserve" bytes="14176">Template:Documentation subpage This is the Template:Tl or message box meta-template.

It is used to build message box templates such as Template:Tl. It offers several different colours, uses default images if no image parameter is given and it has some other features.

This meta-template uses the mbox CSS classes in MediaWiki:Common.css. The classes can also be used directly in a wikitable if special functionality is needed. See the how-to guide for that.

Usage

Simple usage example:

{{mbox | text = Some text.}}

Template loop detected: Template:Mbox Complex example:

{{mbox
| type       = style
| small      = left
| image      = [[File:Emblem-question-yellow.svg|40px|alt=Question mark]]
| smallimage = [[File:Emblem-question-yellow.svg|20px|alt=Question mark]]
| textstyle  = color: red; font-weight: bold; font-style: italic;
| text       = Text for a big box, for the top of articles.
| smalltext  = Text for the top of article sections.
}}

Template loop detected: Template:Mbox

But you are not really supposed to use red bold italic text.

Message box types

The following examples use different type parameters but use no image parameters thus they use the default images for each type.

Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox

Other images

The default images shown above are mostly for convenience. In many cases it is more appropriate to use more specific images. These examples use the image parameter to specify an image other than the default images.

Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox

More examples

Some other parameter combinations.

Template loop detected: Template:Mbox Template loop detected: Template:Mbox

Template loop detected: Template:Mbox

Template loop detected: Template:Mbox

Parameters

List of all parameters:

{{mbox
| type  = critical / serious / warning / notice / / move / protection
| image = none / [[File:...|40px|...]]
| imagewidth = width of image section / default is 52px
| imageright = [[File:...|40px|...]]
| imagerightwidth = width of right image section / default is 52px
| style = CSS values
| textstyle = CSS values
| text  = The message body text.
| small = {{{small|}}} / left
| smallimage = none / [[File:...|20px|...]]
| smallimageright = none / [[File:...|20px|...]]
| smalltext  = A shorter message body text.
}}

type

If no type parameter is given the template has a 'blank' style.

image

No parameter = If no image parameter is given the template uses a default image. Which default image it uses depends on the type parameter.
An image = Should be an image with usual wiki notation. Widths of 40px - 50px are usually about right. (Images over 52 pixels wide will cause padding problems, unless you also set imagewidth.)
Often an icon is purely decorative in the W3C sense that it repeats the text. To improve accessibility, it is desirable to not have it be announced by screen readers, as well as to avoid it linking to an irrelevant page. If (and only if) the image license allows this, it can be marked with "Template:ParaTemplate:Para". For example:
image = [[File:Unbalanced scales.svg|40px|link=|alt=]]
Conversely, an icon that does not use "Template:ParaTemplate:Para", and which therefore is announced to visually impaired readers, should use an "Template:Para" parameter that describes the icon. With no Template:Para parameter (using the default link), the alt text should describe the icon's visual appearance. For example:
image = [[File:Gnome globe current event.svg|40px|alt=Clock over a larger globe]]
With a nonempty "Template:Para" the alt text should describe the icon's function. For example:
image = [[File:Purple question mark.svg|40px|link=Special:Random|alt=Random article]]
An icon whose license requires attribution may have alt text, but must keep the default link. Although public domain images do not require a link, many licenses do require one. Please see Purely decorative images for more information about licensing.
none = Means that no image is used.
blank = This parameter is now deprecated. If you see it in use, change it to "image=none".

imagewidth

Optional CSS value used to set width of image's div section. Allowing you to use images wider than the default 52px wide.
Example
imagewidth=100px

imageright

No parameter = If no imageright parameter is given then no image is shown on the right side.
An image = Should be an image with usual wiki notation. 40px - 50px width are usually about right depending on the image height to width ratio. (Images over 52 pixels width will cause padding problems, unless you also set imagerightwidth.) For example:
imageright = [[File:Nuvola apps bookcase.png|40px|alt=Three stacked books]]
Anything = Any other object that you want to show on the right side.

imagerightwidth

Optional CSS value used to set width of image's div section. Allowing you to use images wider than the default 52px wide.
Example
imagerightwidth=100px

style

Optional CSS values used by the entire message box table. Without quotation marks " " but with the ending semicolons ;. For example:
style = margin-bottom: 0.5em;

textstyle

Optional CSS values used by the text cell. For example:
textstyle = text-align: center;

text

The message body text.

The small parameters

The small article message boxes are meant for the top of sections. Normally they should only contain one or two lines of text.

small

left = Makes it a smaller left aligned message box. This also makes the default images smaller. Note that any data fed to the smallimage, smallimageright and smalltext parameters is only used if "small=left". To make it so your template also understands the small parameter you can use this code:
small = {{{small|}}}

Template loop detected: Template:Mbox Template loop detected: Template:Mbox

smallimage

No parameter = If no smallimage parameter is given then this template falls back to use the image parameter. If the image parameter also is empty then a small default image is used.
An image = Should be an image with usual wiki notation. 20px width is usually about right for boxes with one line of text, while 25px width is usually about right for boxes with two lines of text. For example:
smallimage = [[File:Gnome globe current event.svg|20px|alt=Clock over a larger globe]]
none = Means that no image is used. This overrides any image fed to image, when "small=left".

Template loop detected: Template:Mbox

smallimageright

No parameter = If no smallimageright parameter is given then this template falls back to use the imageright parameter. If the imageright parameter also is empty then no image is shown on the right side.
An image = Should be an image with usual wiki notation. 20px - 25px width is usually about right. For example:
smallimageright = [[File:Nuvola apps bookcase.png|20px|alt=Three stacked books]]
Anything = Any other object that you want to show on the right side.
none = Means that no right side image is used. This overrides any image fed to imageright, when "small=left".

Template loop detected: Template:Mbox

smalltext

A shorter version of the message body text. If no smalltext parameter is given then this template falls back to use the text parameter.

Technical details

If you need to use special characters in the text parameter then you need to escape them like this:

{{mbox
| text  = <div>
Equal sign = and a start and end brace { } work fine as they are.
But here is a pipe &#124; and two end braces <nowiki>}}</nowiki>.
And now a pipe and end braces <nowiki>|}}</nowiki>.
</div>
}}

Template loop detected: Template:Mbox

The <div> tags that surround the text in the example above are usually not needed. But if the text contains line breaks then sometimes we get weird line spacing. This especially happens when using vertical dotted lists. Then use the div tags to fix that.

This template uses CSS classes in MediaWiki:Common.css for most of its looks, thus it is fully skinnable.

This template calls Template:Tl which holds most of the code for Template:Tl, while Template:Tl itself does parameter preprocessing.

Internally this meta-template uses HTML wikimarkup instead of wikimarkup for the table code. That is the usual way we make meta-templates since wikimarkup has several drawbacks. For instance it makes it harder to use parser functions and some special characters in parameters.

The default images for this meta-template are in png format instead of svg format. The main reason is that some older web browsers have trouble with the transparent background that MediaWiki renders for svg images. The png images here have hand optimised transparent background colour so they look good in all browsers. Note that svg icons only look somewhat bad in the old browsers, thus such hand optimisation is only worth the trouble for very widely used icons.

For more technical details see the talk page and the "See also" links below.

See also

Template:Mbox templates Other pages:

</text><sha1>5cafb545bbublgg4mei08dvwxs9zay9</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Mbox templates</title><ns>10</ns><id>95150</id><revision><id>692773</id><parentid>565939</parentid><timestamp>2013-05-21T16:37:34Z</timestamp><contributor><ip>90.209.78.127</ip></contributor><text xml:space="preserve" bytes="268">Template:Nmbox</text><sha1>mm2hquqpmw1k85xftye00jkid2a0l4u</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Namespace detect</title><ns>10</ns><id>79689</id><revision><id>695915</id><parentid>497627</parentid><timestamp>2013-05-27T09:23:36Z</timestamp><contributor><ip>81.129.84.113</ip></contributor><text xml:space="preserve" bytes="1470">{{#switch:

 {{#if: 
   | {{{demospace}}}
   | {{#if: 
     | 
       {{#ifeq:|
       | talk
       |  
       }}
     | 
       {{#ifeq:template|template talk
       | talk
       | template 
       }}
     }}
   }}

| main | = | talk = | user = | project = | file | image = | mediawiki = | template = | help = | category = | book = | extension = | other | #default =

}}</text><sha1>qry2n28n1p12gxaxgu7gs1bkzywbpqv</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Nmbox</title><ns>10</ns><id>47495</id><revision><id>556782</id><parentid>328128</parentid><timestamp>2012-06-29T10:35:15Z</timestamp><contributor><username>Krinkle</username><id>135822</id></contributor><text xml:space="preserve" bytes="587"> {{#if: | |

}}

type=notice – Points of information, such as Template:Tl.
</text><sha1>6k7jc6wiy6i7qy82dd4dw1xja6e8k5w</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Ombox</title><ns>10</ns><id>93344</id><revision><id>634878</id><parentid>634793</parentid><timestamp>2013-01-25T22:39:30Z</timestamp><contributor><username>Kaldari</username><id>31661</id></contributor><comment>reverting breakage</comment><text xml:space="preserve" bytes="723">{{#ifeq:|yes

| Template:Ombox/core | Template:Ombox/core

}}</text><sha1>p9vh00dqvq0u1q3950ueg6abd93dyrt</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Ombox/core</title><ns>10</ns><id>93345</id><revision><id>680423</id><parentid>680422</parentid><timestamp>2013-04-29T09:31:02Z</timestamp><contributor><username>Siebrand</username><id>5665</id></contributor><minor/><comment>Protected "Template:Ombox/core": Highly visible template ([Edit=Allow only autoconfirmed users] (indefinite) [Move=Allow only autoconfirmed users] (indefinite))</comment><text xml:space="preserve" bytes="2250"> {{#ifeq:|none | | }}

{{#if: | {{#ifeq:|none

 | 
|
 }}

}}

{{#switch:notice

| | critical | important | warning | caution | license | speedy | delete | content | style | move | protection | notice =

| #default =
This message box is using an invalid "type=notice" parameter and needs fixing.
[[Category:Wikipedia message box parameter needs fixing|Template:Main otherTemplate:Mbox]]

}}</text><sha1>l3n9mp2c6ch14gekpe1oxxe8thp3xdb</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Para</title><ns>10</ns><id>40658</id><revision><id>557339</id><parentid>557338</parentid><timestamp>2012-06-30T23:27:18Z</timestamp><contributor><username>Reedy</username><id>28424</id></contributor><minor/><comment>1 revision from w:en:Template:Para</comment><text xml:space="preserve" bytes="238">|{{#if:|{{{1}}}=|}}</text><sha1>3ve3qhqjaafu9wuy6em7y1fz49qyqfx</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Purge</title><ns>10</ns><id>31341</id><revision><id>405355</id><parentid>405354</parentid><timestamp>2011-05-24T01:39:17Z</timestamp><contributor><username>Peachey88</username><id>31302</id></contributor><minor/><comment>1 revision from w:en:Template:Purge: update to en.wiki</comment><text xml:space="preserve" bytes="197">Purge</text><sha1>830osaj62tvmlh6zq374ixtzbukxcih</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Tl</title><ns>10</ns><id>12644</id><redirect title="Template:Tlx"/><revision><id>760820</id><parentid>760712</parentid><timestamp>2013-08-10T10:29:27Z</timestamp><contributor><username>IAlex</username><id>17961</id></contributor><minor/><comment>Reverted edits by 175.200.179.56 (talk) to last revision by Varnent</comment><text xml:space="preserve" bytes="25">#REDIRECTTemplate:Tlx</text><sha1>avv0qklcaxr8n5r45lcc2x17y9w78sc</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Tlx</title><ns>10</ns><id>20809</id><revision><id>557363</id><parentid>534113</parentid><timestamp>2012-06-30T23:27:22Z</timestamp><contributor><username>Reedy</username><id>28424</id></contributor><minor/><comment>1 revision from w:en:Template:Tlx</comment><text xml:space="preserve" bytes="385">{{[[Template:|]]{{#if:| |{{{2}}} }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}}</text><sha1>0d6b5bkc7j2tegvw2yzm4b6iil98xqg</sha1> <mediawiki xsi:schemaLocation="http://www.mediawiki.org/xml/export-0.8/ http://www.mediawiki.org/xml/export-0.8.xsd" version="0.8" xml:lang="en"><siteinfo><sitename>MediaWiki</sitename><base>http://www.mediawiki.org/wiki/MediaWiki</base><generator>MediaWiki 1.22wmf12</generator><case>first-letter</case><namespaces><namespace key="-2" case="first-letter">Media</namespace><namespace key="-1" case="first-letter">Special</namespace><namespace key="0" case="first-letter"/><namespace key="1" case="first-letter">Talk</namespace><namespace key="2" case="first-letter">User</namespace><namespace key="3" case="first-letter">User talk</namespace><namespace key="4" case="first-letter">Project</namespace><namespace key="5" case="first-letter">Project talk</namespace><namespace key="6" case="first-letter">File</namespace><namespace key="7" case="first-letter">File talk</namespace><namespace key="8" case="first-letter">MediaWiki</namespace><namespace key="9" case="first-letter">MediaWiki talk</namespace><namespace key="10" case="first-letter">Template</namespace><namespace key="11" case="first-letter">Template talk</namespace><namespace key="12" case="first-letter">Help</namespace><namespace key="13" case="first-letter">Help talk</namespace><namespace key="14" case="first-letter">Category</namespace><namespace key="15" case="first-letter">Category talk</namespace><namespace key="90" case="first-letter">Thread</namespace><namespace key="91" case="first-letter">Thread talk</namespace><namespace key="92" case="first-letter">Summary</namespace><namespace key="93" case="first-letter">Summary talk</namespace><namespace key="100" case="first-letter">Manual</namespace><namespace key="101" case="first-letter">Manual talk</namespace><namespace key="102" case="first-letter">Extension</namespace><namespace key="103" case="first-letter">Extension talk</namespace><namespace key="104" case="first-letter">API</namespace><namespace key="105" case="first-letter">API talk</namespace><namespace key="106" case="first-letter">Skin</namespace><namespace key="107" case="first-letter">Skin talk</namespace><namespace key="828" case="first-letter">Module</namespace><namespace key="829" case="first-letter">Module talk</namespace><namespace key="1198" case="first-letter">Translations</namespace><namespace key="1199" case="first-letter">Translations talk</namespace><namespace key="2500" case="first-letter">VisualEditor</namespace><namespace key="2501" case="first-letter">VisualEditor talk</namespace></namespaces></siteinfo><page><title>Template:Mbox</title><ns>10</ns><id>45372</id><revision><id>634882</id><parentid>634876</parentid><timestamp>2013-01-25T22:40:38Z</timestamp><contributor><username>Kaldari</username><id>31661</id></contributor><comment>reverting self, problem was in ombox template</comment><text xml:space="preserve" bytes="707">{{

 Template:Namespace detect

| type = | image = | imageright = | class = | style = | textstyle = | text = type=(blank) – Default; general 'box'. | small = | smallimage = | smallimageright = | smalltext = | subst = | date = | name = }}</text><sha1>40w6e1mdq2t695t9dv143e1rzq5pv1o</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation</title><ns>10</ns><id>20803</id><revision><id>688512</id><parentid>687083</parentid><timestamp>2013-05-11T17:18:34Z</timestamp><contributor><username>Wargo</username><id>25061</id></contributor><text xml:space="preserve" bytes="2079">{{#ifeq: Mbox | sandbox

|
Template:Template sandbox notice

}}Template:Documentation/start box2 {{#switch: {{#if:|1|0}}{{#if:|1|0}}{{#ifexist:|1|0}}{{#ifexist:Template:Documentation/docspace:Template:Documentation/template page/doc|1|0}} | 1000 | 1001 | 1010 | 1011 | 1100 | 1101 | 1110 | 1111 = | 0110 | 0111 = {{ {{{1}}} }} | 0001 | 0011 = {{ Template:Documentation/docspace:Template:Documentation/template page/doc }} | 0000 | 0100 | 0010 | 0101 = }} Template:Documentation/end box2</text><sha1>bvikrz5412m4gizkphh8ftj604e3kbf</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/docspace</title><ns>10</ns><id>93323</id><revision><id>631615</id><parentid>557279</parentid><timestamp>2013-01-20T15:55:26Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><minor/><comment>1 revision from w:en:Template:Documentation/docspace: Requested by average_drifter in #mediawiki</comment><text xml:space="preserve" bytes="302">{{#switch: Template

 | 
 | File
 | MediaWiki
 | Category = Template talk
 | #default = Template
}}</text><sha1>7f8iymss9sr4v7f4t5pza1arwjogrv3</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/end box</title><ns>10</ns><id>93324</id><revision><id>631856</id><parentid>631623</parentid><timestamp>2013-01-20T16:24:41Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><text xml:space="preserve" bytes="4124">

{{#if:

 {{#ifeq:  | off
 |
 | yes{{
   #switch: Template
   | User
   | Template = yes
   }}
 }}

| Template:Fmbox }}{{#if:

 {{#switch: Mbox
 | doc
 | testcases = strange
 }}

| [[Category:Wikipedia pages with strange ((documentation)) usage|Template:Main otherTemplate:Mbox]]

}}</text><sha1>r3qht4u0hwps2mqnst3puyi8anb9dmz</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/end box2</title><ns>10</ns><id>124329</id><revision><id>688362</id><parentid>688359</parentid><timestamp>2013-05-11T09:36:55Z</timestamp><contributor><username>Shirayuki</username><id>472859</id></contributor><comment>Undo revision 688359 by Shirayuki (talk)</comment><text xml:space="preserve" bytes="864">Template:Documentation/end box</text><sha1>sfe0ppdpxp1nwfzhpym4jwdtmgpph1p</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/start box</title><ns>10</ns><id>93326</id><revision><id>742132</id><parentid>742131</parentid><timestamp>2013-07-20T14:04:29Z</timestamp><contributor><ip>81.129.86.23</ip></contributor><text xml:space="preserve" bytes="2002">

{{#ifeq: ¬ |

|

|
{{#switch: ¬
 | ¬ =   
   {{#switch: Template 
   | Template = File:Template-info.png Template documentation
   | Template:Ns:Module = File:Template-info.png Module documentation
   | File = Summary
   | #default = Documentation
   }}
 | #default = 
   
 }}{{
 #if: 
 | 
 | 
   {{
   #if: yes
   | [view] [edit] [history] [[[:Template:Purge]]] 
   | 
     [#if:  _        | %7B%7B%7Bpreload%7D%7D%7D_        | {{#ifeq: Template | File_          | Template:Documentation/preload-filespace_          | Template:Documentation/preload_          }} }} create]
   }}
}}

}}</text><sha1>linb792zr3zrp72qrhjkmqg1mz6uevr</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/start box2</title><ns>10</ns><id>93327</id><revision><id>631642</id><parentid>585737</parentid><timestamp>2013-01-20T15:55:27Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><minor/><comment>4 revisions from w:en:Template:Documentation/start box2: Requested by average_drifter in #mediawiki</comment><text xml:space="preserve" bytes="625">Template:Documentation/start box</text><sha1>t5j6y918odlsx0iuls0qgi6wbl050q3</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/template page</title><ns>10</ns><id>93328</id><revision><id>631644</id><parentid>557289</parentid><timestamp>2013-01-20T15:55:27Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><minor/><comment>1 revision from w:en:Template:Documentation/template page: Requested by average_drifter in #mediawiki</comment><text xml:space="preserve" bytes="232">{{#switch: Mbox | sandbox | testcases = Mbox | #default = Mbox }}</text><sha1>fenc3r6oe2sito28b1d8xgyo9gpq5uf</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation subpage</title><ns>10</ns><id>20806</id><revision><id>757428</id><parentid>715052</parentid><timestamp>2013-08-05T14:14:46Z</timestamp><contributor><username>IAlex</username><id>17961</id></contributor><minor/><comment>Reverted edits by 90.219.4.40 (talk) to last revision by Shirayuki</comment><text xml:space="preserve" bytes="2616">{{#if: |

File:Edit-paste.svg This is the template documentation page for Template:Mbox.
This page may not be intended to be viewed directly.
Links using variables may appear broken; do not replace these with hardcoded page names or URLs.
{{#if:x||

}} |{{#ifeq: mbox | doc

 | 

{{

   #ifeq: show | show
   | Template loop detected: Template:Mbox
   }}{{
   #if: 
   | 
   | {{#ifeq:Template|Template|}}
 }}

| }}

}}</text><sha1>7a3si8r4k2z0aqxpbbxz1c0gmny5pb9</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Fmbox</title><ns>10</ns><id>37655</id><revision><id>558796</id><parentid>558707</parentid><timestamp>2012-07-05T06:11:26Z</timestamp><contributor><username>Krinkle</username><id>135822</id></contributor><comment>update from enwiki</comment><text xml:space="preserve" bytes="1344"> {{#ifeq:|none | | }}

{{#if:

|

}}

{{#switch:

| | warning | editnotice | system =

| #default =
This message box is using an invalid "type=" parameter and needs fixing.
[[Category:Wikipedia message box parameter needs fixing|Template:Main otherTemplate:Mbox]]

}}</text><sha1>mrldgfpkjyqf89ukmq2vy7gh3ir2j7i</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Mbox/doc</title><ns>10</ns><id>45374</id><revision><id>659649</id><parentid>651771</parentid><timestamp>2013-03-14T09:07:42Z</timestamp><contributor><username>Krinkle</username><id>135822</id></contributor><text xml:space="preserve" bytes="14176">Template:Documentation subpage This is the Template:Tl or message box meta-template.

It is used to build message box templates such as Template:Tl. It offers several different colours, uses default images if no image parameter is given and it has some other features.

This meta-template uses the mbox CSS classes in MediaWiki:Common.css. The classes can also be used directly in a wikitable if special functionality is needed. See the how-to guide for that.

Usage

Simple usage example:

{{mbox | text = Some text.}}

Template loop detected: Template:Mbox Complex example:

{{mbox
| type       = style
| small      = left
| image      = [[File:Emblem-question-yellow.svg|40px|alt=Question mark]]
| smallimage = [[File:Emblem-question-yellow.svg|20px|alt=Question mark]]
| textstyle  = color: red; font-weight: bold; font-style: italic;
| text       = Text for a big box, for the top of articles.
| smalltext  = Text for the top of article sections.
}}

Template loop detected: Template:Mbox

But you are not really supposed to use red bold italic text.

Message box types

The following examples use different type parameters but use no image parameters thus they use the default images for each type.

Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox

Other images

The default images shown above are mostly for convenience. In many cases it is more appropriate to use more specific images. These examples use the image parameter to specify an image other than the default images.

Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox

More examples

Some other parameter combinations.

Template loop detected: Template:Mbox Template loop detected: Template:Mbox

Template loop detected: Template:Mbox

Template loop detected: Template:Mbox

Parameters

List of all parameters:

{{mbox
| type  = critical / serious / warning / notice / / move / protection
| image = none / [[File:...|40px|...]]
| imagewidth = width of image section / default is 52px
| imageright = [[File:...|40px|...]]
| imagerightwidth = width of right image section / default is 52px
| style = CSS values
| textstyle = CSS values
| text  = The message body text.
| small = {{{small|}}} / left
| smallimage = none / [[File:...|20px|...]]
| smallimageright = none / [[File:...|20px|...]]
| smalltext  = A shorter message body text.
}}

type

If no type parameter is given the template has a 'blank' style.

image

No parameter = If no image parameter is given the template uses a default image. Which default image it uses depends on the type parameter.
An image = Should be an image with usual wiki notation. Widths of 40px - 50px are usually about right. (Images over 52 pixels wide will cause padding problems, unless you also set imagewidth.)
Often an icon is purely decorative in the W3C sense that it repeats the text. To improve accessibility, it is desirable to not have it be announced by screen readers, as well as to avoid it linking to an irrelevant page. If (and only if) the image license allows this, it can be marked with "Template:ParaTemplate:Para". For example:
image = [[File:Unbalanced scales.svg|40px|link=|alt=]]
Conversely, an icon that does not use "Template:ParaTemplate:Para", and which therefore is announced to visually impaired readers, should use an "Template:Para" parameter that describes the icon. With no Template:Para parameter (using the default link), the alt text should describe the icon's visual appearance. For example:
image = [[File:Gnome globe current event.svg|40px|alt=Clock over a larger globe]]
With a nonempty "Template:Para" the alt text should describe the icon's function. For example:
image = [[File:Purple question mark.svg|40px|link=Special:Random|alt=Random article]]
An icon whose license requires attribution may have alt text, but must keep the default link. Although public domain images do not require a link, many licenses do require one. Please see Purely decorative images for more information about licensing.
none = Means that no image is used.
blank = This parameter is now deprecated. If you see it in use, change it to "image=none".

imagewidth

Optional CSS value used to set width of image's div section. Allowing you to use images wider than the default 52px wide.
Example
imagewidth=100px

imageright

No parameter = If no imageright parameter is given then no image is shown on the right side.
An image = Should be an image with usual wiki notation. 40px - 50px width are usually about right depending on the image height to width ratio. (Images over 52 pixels width will cause padding problems, unless you also set imagerightwidth.) For example:
imageright = [[File:Nuvola apps bookcase.png|40px|alt=Three stacked books]]
Anything = Any other object that you want to show on the right side.

imagerightwidth

Optional CSS value used to set width of image's div section. Allowing you to use images wider than the default 52px wide.
Example
imagerightwidth=100px

style

Optional CSS values used by the entire message box table. Without quotation marks " " but with the ending semicolons ;. For example:
style = margin-bottom: 0.5em;

textstyle

Optional CSS values used by the text cell. For example:
textstyle = text-align: center;

text

The message body text.

The small parameters

The small article message boxes are meant for the top of sections. Normally they should only contain one or two lines of text.

small

left = Makes it a smaller left aligned message box. This also makes the default images smaller. Note that any data fed to the smallimage, smallimageright and smalltext parameters is only used if "small=left". To make it so your template also understands the small parameter you can use this code:
small = {{{small|}}}

Template loop detected: Template:Mbox Template loop detected: Template:Mbox

smallimage

No parameter = If no smallimage parameter is given then this template falls back to use the image parameter. If the image parameter also is empty then a small default image is used.
An image = Should be an image with usual wiki notation. 20px width is usually about right for boxes with one line of text, while 25px width is usually about right for boxes with two lines of text. For example:
smallimage = [[File:Gnome globe current event.svg|20px|alt=Clock over a larger globe]]
none = Means that no image is used. This overrides any image fed to image, when "small=left".

Template loop detected: Template:Mbox

smallimageright

No parameter = If no smallimageright parameter is given then this template falls back to use the imageright parameter. If the imageright parameter also is empty then no image is shown on the right side.
An image = Should be an image with usual wiki notation. 20px - 25px width is usually about right. For example:
smallimageright = [[File:Nuvola apps bookcase.png|20px|alt=Three stacked books]]
Anything = Any other object that you want to show on the right side.
none = Means that no right side image is used. This overrides any image fed to imageright, when "small=left".

Template loop detected: Template:Mbox

smalltext

A shorter version of the message body text. If no smalltext parameter is given then this template falls back to use the text parameter.

Technical details

If you need to use special characters in the text parameter then you need to escape them like this:

{{mbox
| text  = <div>
Equal sign = and a start and end brace { } work fine as they are.
But here is a pipe &#124; and two end braces <nowiki>}}</nowiki>.
And now a pipe and end braces <nowiki>|}}</nowiki>.
</div>
}}

Template loop detected: Template:Mbox

The <div> tags that surround the text in the example above are usually not needed. But if the text contains line breaks then sometimes we get weird line spacing. This especially happens when using vertical dotted lists. Then use the div tags to fix that.

This template uses CSS classes in MediaWiki:Common.css for most of its looks, thus it is fully skinnable.

This template calls Template:Tl which holds most of the code for Template:Tl, while Template:Tl itself does parameter preprocessing.

Internally this meta-template uses HTML wikimarkup instead of wikimarkup for the table code. That is the usual way we make meta-templates since wikimarkup has several drawbacks. For instance it makes it harder to use parser functions and some special characters in parameters.

The default images for this meta-template are in png format instead of svg format. The main reason is that some older web browsers have trouble with the transparent background that MediaWiki renders for svg images. The png images here have hand optimised transparent background colour so they look good in all browsers. Note that svg icons only look somewhat bad in the old browsers, thus such hand optimisation is only worth the trouble for very widely used icons.

For more technical details see the talk page and the "See also" links below.

See also

Template:Mbox templates Other pages:

</text><sha1>5cafb545bbublgg4mei08dvwxs9zay9</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Mbox templates</title><ns>10</ns><id>95150</id><revision><id>692773</id><parentid>565939</parentid><timestamp>2013-05-21T16:37:34Z</timestamp><contributor><ip>90.209.78.127</ip></contributor><text xml:space="preserve" bytes="268">Template:Nmbox</text><sha1>mm2hquqpmw1k85xftye00jkid2a0l4u</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Namespace detect</title><ns>10</ns><id>79689</id><revision><id>695915</id><parentid>497627</parentid><timestamp>2013-05-27T09:23:36Z</timestamp><contributor><ip>81.129.84.113</ip></contributor><text xml:space="preserve" bytes="1470">{{#switch:

 {{#if: 
   | {{{demospace}}}
   | {{#if: 
     | 
       {{#ifeq:|
       | talk
       |  
       }}
     | 
       {{#ifeq:template|template talk
       | talk
       | template 
       }}
     }}
   }}

| main | = | talk = | user = | project = | file | image = | mediawiki = | template = | help = | category = | book = | extension = | other | #default =

}}</text><sha1>qry2n28n1p12gxaxgu7gs1bkzywbpqv</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Nmbox</title><ns>10</ns><id>47495</id><revision><id>556782</id><parentid>328128</parentid><timestamp>2012-06-29T10:35:15Z</timestamp><contributor><username>Krinkle</username><id>135822</id></contributor><text xml:space="preserve" bytes="587"> {{#if: | |

}}

type=(blank) – Default; general 'box'.
</text><sha1>6k7jc6wiy6i7qy82dd4dw1xja6e8k5w</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Ombox</title><ns>10</ns><id>93344</id><revision><id>634878</id><parentid>634793</parentid><timestamp>2013-01-25T22:39:30Z</timestamp><contributor><username>Kaldari</username><id>31661</id></contributor><comment>reverting breakage</comment><text xml:space="preserve" bytes="723">{{#ifeq:|yes

| Template:Ombox/core | Template:Ombox/core

}}</text><sha1>p9vh00dqvq0u1q3950ueg6abd93dyrt</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Ombox/core</title><ns>10</ns><id>93345</id><revision><id>680423</id><parentid>680422</parentid><timestamp>2013-04-29T09:31:02Z</timestamp><contributor><username>Siebrand</username><id>5665</id></contributor><minor/><comment>Protected "Template:Ombox/core": Highly visible template ([Edit=Allow only autoconfirmed users] (indefinite) [Move=Allow only autoconfirmed users] (indefinite))</comment><text xml:space="preserve" bytes="2250"> {{#ifeq:|none | | }}

{{#if: | {{#ifeq:|none

 | 
|
 }}

}}

{{#switch:

| | critical | important | warning | caution | license | speedy | delete | content | style | move | protection | notice =

| #default =
This message box is using an invalid "type=" parameter and needs fixing.
[[Category:Wikipedia message box parameter needs fixing|Template:Main otherTemplate:Mbox]]

}}</text><sha1>l3n9mp2c6ch14gekpe1oxxe8thp3xdb</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Para</title><ns>10</ns><id>40658</id><revision><id>557339</id><parentid>557338</parentid><timestamp>2012-06-30T23:27:18Z</timestamp><contributor><username>Reedy</username><id>28424</id></contributor><minor/><comment>1 revision from w:en:Template:Para</comment><text xml:space="preserve" bytes="238">|{{#if:|{{{1}}}=|}}</text><sha1>3ve3qhqjaafu9wuy6em7y1fz49qyqfx</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Purge</title><ns>10</ns><id>31341</id><revision><id>405355</id><parentid>405354</parentid><timestamp>2011-05-24T01:39:17Z</timestamp><contributor><username>Peachey88</username><id>31302</id></contributor><minor/><comment>1 revision from w:en:Template:Purge: update to en.wiki</comment><text xml:space="preserve" bytes="197">Purge</text><sha1>830osaj62tvmlh6zq374ixtzbukxcih</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Tl</title><ns>10</ns><id>12644</id><redirect title="Template:Tlx"/><revision><id>760820</id><parentid>760712</parentid><timestamp>2013-08-10T10:29:27Z</timestamp><contributor><username>IAlex</username><id>17961</id></contributor><minor/><comment>Reverted edits by 175.200.179.56 (talk) to last revision by Varnent</comment><text xml:space="preserve" bytes="25">#REDIRECTTemplate:Tlx</text><sha1>avv0qklcaxr8n5r45lcc2x17y9w78sc</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Tlx</title><ns>10</ns><id>20809</id><revision><id>557363</id><parentid>534113</parentid><timestamp>2012-06-30T23:27:22Z</timestamp><contributor><username>Reedy</username><id>28424</id></contributor><minor/><comment>1 revision from w:en:Template:Tlx</comment><text xml:space="preserve" bytes="385">{{[[Template:|]]{{#if:| |{{{2}}} }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}}</text><sha1>0d6b5bkc7j2tegvw2yzm4b6iil98xqg</sha1> <mediawiki xsi:schemaLocation="http://www.mediawiki.org/xml/export-0.8/ http://www.mediawiki.org/xml/export-0.8.xsd" version="0.8" xml:lang="en"><siteinfo><sitename>MediaWiki</sitename><base>http://www.mediawiki.org/wiki/MediaWiki</base><generator>MediaWiki 1.22wmf12</generator><case>first-letter</case><namespaces><namespace key="-2" case="first-letter">Media</namespace><namespace key="-1" case="first-letter">Special</namespace><namespace key="0" case="first-letter"/><namespace key="1" case="first-letter">Talk</namespace><namespace key="2" case="first-letter">User</namespace><namespace key="3" case="first-letter">User talk</namespace><namespace key="4" case="first-letter">Project</namespace><namespace key="5" case="first-letter">Project talk</namespace><namespace key="6" case="first-letter">File</namespace><namespace key="7" case="first-letter">File talk</namespace><namespace key="8" case="first-letter">MediaWiki</namespace><namespace key="9" case="first-letter">MediaWiki talk</namespace><namespace key="10" case="first-letter">Template</namespace><namespace key="11" case="first-letter">Template talk</namespace><namespace key="12" case="first-letter">Help</namespace><namespace key="13" case="first-letter">Help talk</namespace><namespace key="14" case="first-letter">Category</namespace><namespace key="15" case="first-letter">Category talk</namespace><namespace key="90" case="first-letter">Thread</namespace><namespace key="91" case="first-letter">Thread talk</namespace><namespace key="92" case="first-letter">Summary</namespace><namespace key="93" case="first-letter">Summary talk</namespace><namespace key="100" case="first-letter">Manual</namespace><namespace key="101" case="first-letter">Manual talk</namespace><namespace key="102" case="first-letter">Extension</namespace><namespace key="103" case="first-letter">Extension talk</namespace><namespace key="104" case="first-letter">API</namespace><namespace key="105" case="first-letter">API talk</namespace><namespace key="106" case="first-letter">Skin</namespace><namespace key="107" case="first-letter">Skin talk</namespace><namespace key="828" case="first-letter">Module</namespace><namespace key="829" case="first-letter">Module talk</namespace><namespace key="1198" case="first-letter">Translations</namespace><namespace key="1199" case="first-letter">Translations talk</namespace><namespace key="2500" case="first-letter">VisualEditor</namespace><namespace key="2501" case="first-letter">VisualEditor talk</namespace></namespaces></siteinfo><page><title>Template:Mbox</title><ns>10</ns><id>45372</id><revision><id>634882</id><parentid>634876</parentid><timestamp>2013-01-25T22:40:38Z</timestamp><contributor><username>Kaldari</username><id>31661</id></contributor><comment>reverting self, problem was in ombox template</comment><text xml:space="preserve" bytes="707">{{

 Template:Namespace detect

| type = move | image = | imageright = | class = | style = | textstyle = | text = type=move – Merge, split and transwiki proposals, such as Template:Tl and Template:Tl. | small = | smallimage = | smallimageright = | smalltext = | subst = | date = | name = }}</text><sha1>40w6e1mdq2t695t9dv143e1rzq5pv1o</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation</title><ns>10</ns><id>20803</id><revision><id>688512</id><parentid>687083</parentid><timestamp>2013-05-11T17:18:34Z</timestamp><contributor><username>Wargo</username><id>25061</id></contributor><text xml:space="preserve" bytes="2079">{{#ifeq: Mbox | sandbox

|
Template:Template sandbox notice

}}Template:Documentation/start box2 {{#switch: {{#if:|1|0}}{{#if:|1|0}}{{#ifexist:|1|0}}{{#ifexist:Template:Documentation/docspace:Template:Documentation/template page/doc|1|0}} | 1000 | 1001 | 1010 | 1011 | 1100 | 1101 | 1110 | 1111 = | 0110 | 0111 = {{ {{{1}}} }} | 0001 | 0011 = {{ Template:Documentation/docspace:Template:Documentation/template page/doc }} | 0000 | 0100 | 0010 | 0101 = }} Template:Documentation/end box2</text><sha1>bvikrz5412m4gizkphh8ftj604e3kbf</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/docspace</title><ns>10</ns><id>93323</id><revision><id>631615</id><parentid>557279</parentid><timestamp>2013-01-20T15:55:26Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><minor/><comment>1 revision from w:en:Template:Documentation/docspace: Requested by average_drifter in #mediawiki</comment><text xml:space="preserve" bytes="302">{{#switch: Template

 | 
 | File
 | MediaWiki
 | Category = Template talk
 | #default = Template
}}</text><sha1>7f8iymss9sr4v7f4t5pza1arwjogrv3</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/end box</title><ns>10</ns><id>93324</id><revision><id>631856</id><parentid>631623</parentid><timestamp>2013-01-20T16:24:41Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><text xml:space="preserve" bytes="4124">

{{#if:

 {{#ifeq:  | off
 |
 | yes{{
   #switch: Template
   | User
   | Template = yes
   }}
 }}

| Template:Fmbox }}{{#if:

 {{#switch: Mbox
 | doc
 | testcases = strange
 }}

| [[Category:Wikipedia pages with strange ((documentation)) usage|Template:Main otherTemplate:Mbox]]

}}</text><sha1>r3qht4u0hwps2mqnst3puyi8anb9dmz</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/end box2</title><ns>10</ns><id>124329</id><revision><id>688362</id><parentid>688359</parentid><timestamp>2013-05-11T09:36:55Z</timestamp><contributor><username>Shirayuki</username><id>472859</id></contributor><comment>Undo revision 688359 by Shirayuki (talk)</comment><text xml:space="preserve" bytes="864">Template:Documentation/end box</text><sha1>sfe0ppdpxp1nwfzhpym4jwdtmgpph1p</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/start box</title><ns>10</ns><id>93326</id><revision><id>742132</id><parentid>742131</parentid><timestamp>2013-07-20T14:04:29Z</timestamp><contributor><ip>81.129.86.23</ip></contributor><text xml:space="preserve" bytes="2002">

{{#ifeq: ¬ |

|

|
{{#switch: ¬
 | ¬ =   
   {{#switch: Template 
   | Template = File:Template-info.png Template documentation
   | Template:Ns:Module = File:Template-info.png Module documentation
   | File = Summary
   | #default = Documentation
   }}
 | #default = 
   
 }}{{
 #if: 
 | 
 | 
   {{
   #if: yes
   | [view] [edit] [history] [[[:Template:Purge]]] 
   | 
     [#if:  _        | %7B%7B%7Bpreload%7D%7D%7D_        | {{#ifeq: Template | File_          | Template:Documentation/preload-filespace_          | Template:Documentation/preload_          }} }} create]
   }}
}}

}}</text><sha1>linb792zr3zrp72qrhjkmqg1mz6uevr</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/start box2</title><ns>10</ns><id>93327</id><revision><id>631642</id><parentid>585737</parentid><timestamp>2013-01-20T15:55:27Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><minor/><comment>4 revisions from w:en:Template:Documentation/start box2: Requested by average_drifter in #mediawiki</comment><text xml:space="preserve" bytes="625">Template:Documentation/start box</text><sha1>t5j6y918odlsx0iuls0qgi6wbl050q3</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/template page</title><ns>10</ns><id>93328</id><revision><id>631644</id><parentid>557289</parentid><timestamp>2013-01-20T15:55:27Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><minor/><comment>1 revision from w:en:Template:Documentation/template page: Requested by average_drifter in #mediawiki</comment><text xml:space="preserve" bytes="232">{{#switch: Mbox | sandbox | testcases = Mbox | #default = Mbox }}</text><sha1>fenc3r6oe2sito28b1d8xgyo9gpq5uf</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation subpage</title><ns>10</ns><id>20806</id><revision><id>757428</id><parentid>715052</parentid><timestamp>2013-08-05T14:14:46Z</timestamp><contributor><username>IAlex</username><id>17961</id></contributor><minor/><comment>Reverted edits by 90.219.4.40 (talk) to last revision by Shirayuki</comment><text xml:space="preserve" bytes="2616">{{#if: |

File:Edit-paste.svg This is the template documentation page for Template:Mbox.
This page may not be intended to be viewed directly.
Links using variables may appear broken; do not replace these with hardcoded page names or URLs.
{{#if:x||

}} |{{#ifeq: mbox | doc

 | 

{{

   #ifeq: show | show
   | Template loop detected: Template:Mbox
   }}{{
   #if: 
   | 
   | {{#ifeq:Template|Template|}}
 }}

| }}

}}</text><sha1>7a3si8r4k2z0aqxpbbxz1c0gmny5pb9</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Fmbox</title><ns>10</ns><id>37655</id><revision><id>558796</id><parentid>558707</parentid><timestamp>2012-07-05T06:11:26Z</timestamp><contributor><username>Krinkle</username><id>135822</id></contributor><comment>update from enwiki</comment><text xml:space="preserve" bytes="1344"> {{#ifeq:|none | | }}

{{#if:

|

}}

{{#switch:move

| | warning | editnotice | system =

| #default =
This message box is using an invalid "type=move" parameter and needs fixing.
[[Category:Wikipedia message box parameter needs fixing|Template:Main otherTemplate:Mbox]]

}}</text><sha1>mrldgfpkjyqf89ukmq2vy7gh3ir2j7i</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Mbox/doc</title><ns>10</ns><id>45374</id><revision><id>659649</id><parentid>651771</parentid><timestamp>2013-03-14T09:07:42Z</timestamp><contributor><username>Krinkle</username><id>135822</id></contributor><text xml:space="preserve" bytes="14176">Template:Documentation subpage This is the Template:Tl or message box meta-template.

It is used to build message box templates such as Template:Tl. It offers several different colours, uses default images if no image parameter is given and it has some other features.

This meta-template uses the mbox CSS classes in MediaWiki:Common.css. The classes can also be used directly in a wikitable if special functionality is needed. See the how-to guide for that.

Usage

Simple usage example:

{{mbox | text = Some text.}}

Template loop detected: Template:Mbox Complex example:

{{mbox
| type       = style
| small      = left
| image      = [[File:Emblem-question-yellow.svg|40px|alt=Question mark]]
| smallimage = [[File:Emblem-question-yellow.svg|20px|alt=Question mark]]
| textstyle  = color: red; font-weight: bold; font-style: italic;
| text       = Text for a big box, for the top of articles.
| smalltext  = Text for the top of article sections.
}}

Template loop detected: Template:Mbox

But you are not really supposed to use red bold italic text.

Message box types

The following examples use different type parameters but use no image parameters thus they use the default images for each type.

Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox

Other images

The default images shown above are mostly for convenience. In many cases it is more appropriate to use more specific images. These examples use the image parameter to specify an image other than the default images.

Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox

More examples

Some other parameter combinations.

Template loop detected: Template:Mbox Template loop detected: Template:Mbox

Template loop detected: Template:Mbox

Template loop detected: Template:Mbox

Parameters

List of all parameters:

{{mbox
| type  = critical / serious / warning / notice / / move / protection
| image = none / [[File:...|40px|...]]
| imagewidth = width of image section / default is 52px
| imageright = [[File:...|40px|...]]
| imagerightwidth = width of right image section / default is 52px
| style = CSS values
| textstyle = CSS values
| text  = The message body text.
| small = {{{small|}}} / left
| smallimage = none / [[File:...|20px|...]]
| smallimageright = none / [[File:...|20px|...]]
| smalltext  = A shorter message body text.
}}

type

If no type parameter is given the template has a 'blank' style.

image

No parameter = If no image parameter is given the template uses a default image. Which default image it uses depends on the type parameter.
An image = Should be an image with usual wiki notation. Widths of 40px - 50px are usually about right. (Images over 52 pixels wide will cause padding problems, unless you also set imagewidth.)
Often an icon is purely decorative in the W3C sense that it repeats the text. To improve accessibility, it is desirable to not have it be announced by screen readers, as well as to avoid it linking to an irrelevant page. If (and only if) the image license allows this, it can be marked with "Template:ParaTemplate:Para". For example:
image = [[File:Unbalanced scales.svg|40px|link=|alt=]]
Conversely, an icon that does not use "Template:ParaTemplate:Para", and which therefore is announced to visually impaired readers, should use an "Template:Para" parameter that describes the icon. With no Template:Para parameter (using the default link), the alt text should describe the icon's visual appearance. For example:
image = [[File:Gnome globe current event.svg|40px|alt=Clock over a larger globe]]
With a nonempty "Template:Para" the alt text should describe the icon's function. For example:
image = [[File:Purple question mark.svg|40px|link=Special:Random|alt=Random article]]
An icon whose license requires attribution may have alt text, but must keep the default link. Although public domain images do not require a link, many licenses do require one. Please see Purely decorative images for more information about licensing.
none = Means that no image is used.
blank = This parameter is now deprecated. If you see it in use, change it to "image=none".

imagewidth

Optional CSS value used to set width of image's div section. Allowing you to use images wider than the default 52px wide.
Example
imagewidth=100px

imageright

No parameter = If no imageright parameter is given then no image is shown on the right side.
An image = Should be an image with usual wiki notation. 40px - 50px width are usually about right depending on the image height to width ratio. (Images over 52 pixels width will cause padding problems, unless you also set imagerightwidth.) For example:
imageright = [[File:Nuvola apps bookcase.png|40px|alt=Three stacked books]]
Anything = Any other object that you want to show on the right side.

imagerightwidth

Optional CSS value used to set width of image's div section. Allowing you to use images wider than the default 52px wide.
Example
imagerightwidth=100px

style

Optional CSS values used by the entire message box table. Without quotation marks " " but with the ending semicolons ;. For example:
style = margin-bottom: 0.5em;

textstyle

Optional CSS values used by the text cell. For example:
textstyle = text-align: center;

text

The message body text.

The small parameters

The small article message boxes are meant for the top of sections. Normally they should only contain one or two lines of text.

small

left = Makes it a smaller left aligned message box. This also makes the default images smaller. Note that any data fed to the smallimage, smallimageright and smalltext parameters is only used if "small=left". To make it so your template also understands the small parameter you can use this code:
small = {{{small|}}}

Template loop detected: Template:Mbox Template loop detected: Template:Mbox

smallimage

No parameter = If no smallimage parameter is given then this template falls back to use the image parameter. If the image parameter also is empty then a small default image is used.
An image = Should be an image with usual wiki notation. 20px width is usually about right for boxes with one line of text, while 25px width is usually about right for boxes with two lines of text. For example:
smallimage = [[File:Gnome globe current event.svg|20px|alt=Clock over a larger globe]]
none = Means that no image is used. This overrides any image fed to image, when "small=left".

Template loop detected: Template:Mbox

smallimageright

No parameter = If no smallimageright parameter is given then this template falls back to use the imageright parameter. If the imageright parameter also is empty then no image is shown on the right side.
An image = Should be an image with usual wiki notation. 20px - 25px width is usually about right. For example:
smallimageright = [[File:Nuvola apps bookcase.png|20px|alt=Three stacked books]]
Anything = Any other object that you want to show on the right side.
none = Means that no right side image is used. This overrides any image fed to imageright, when "small=left".

Template loop detected: Template:Mbox

smalltext

A shorter version of the message body text. If no smalltext parameter is given then this template falls back to use the text parameter.

Technical details

If you need to use special characters in the text parameter then you need to escape them like this:

{{mbox
| text  = <div>
Equal sign = and a start and end brace { } work fine as they are.
But here is a pipe &#124; and two end braces <nowiki>}}</nowiki>.
And now a pipe and end braces <nowiki>|}}</nowiki>.
</div>
}}

Template loop detected: Template:Mbox

The <div> tags that surround the text in the example above are usually not needed. But if the text contains line breaks then sometimes we get weird line spacing. This especially happens when using vertical dotted lists. Then use the div tags to fix that.

This template uses CSS classes in MediaWiki:Common.css for most of its looks, thus it is fully skinnable.

This template calls Template:Tl which holds most of the code for Template:Tl, while Template:Tl itself does parameter preprocessing.

Internally this meta-template uses HTML wikimarkup instead of wikimarkup for the table code. That is the usual way we make meta-templates since wikimarkup has several drawbacks. For instance it makes it harder to use parser functions and some special characters in parameters.

The default images for this meta-template are in png format instead of svg format. The main reason is that some older web browsers have trouble with the transparent background that MediaWiki renders for svg images. The png images here have hand optimised transparent background colour so they look good in all browsers. Note that svg icons only look somewhat bad in the old browsers, thus such hand optimisation is only worth the trouble for very widely used icons.

For more technical details see the talk page and the "See also" links below.

See also

Template:Mbox templates Other pages:

</text><sha1>5cafb545bbublgg4mei08dvwxs9zay9</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Mbox templates</title><ns>10</ns><id>95150</id><revision><id>692773</id><parentid>565939</parentid><timestamp>2013-05-21T16:37:34Z</timestamp><contributor><ip>90.209.78.127</ip></contributor><text xml:space="preserve" bytes="268">Template:Nmbox</text><sha1>mm2hquqpmw1k85xftye00jkid2a0l4u</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Namespace detect</title><ns>10</ns><id>79689</id><revision><id>695915</id><parentid>497627</parentid><timestamp>2013-05-27T09:23:36Z</timestamp><contributor><ip>81.129.84.113</ip></contributor><text xml:space="preserve" bytes="1470">{{#switch:

 {{#if: 
   | {{{demospace}}}
   | {{#if: 
     | 
       {{#ifeq:|
       | talk
       |  
       }}
     | 
       {{#ifeq:template|template talk
       | talk
       | template 
       }}
     }}
   }}

| main | = | talk = | user = | project = | file | image = | mediawiki = | template = | help = | category = | book = | extension = | other | #default =

}}</text><sha1>qry2n28n1p12gxaxgu7gs1bkzywbpqv</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Nmbox</title><ns>10</ns><id>47495</id><revision><id>556782</id><parentid>328128</parentid><timestamp>2012-06-29T10:35:15Z</timestamp><contributor><username>Krinkle</username><id>135822</id></contributor><text xml:space="preserve" bytes="587"> {{#if: | |

}}

type=move – Merge, split and transwiki proposals, such as Template:Tl and Template:Tl.
</text><sha1>6k7jc6wiy6i7qy82dd4dw1xja6e8k5w</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Ombox</title><ns>10</ns><id>93344</id><revision><id>634878</id><parentid>634793</parentid><timestamp>2013-01-25T22:39:30Z</timestamp><contributor><username>Kaldari</username><id>31661</id></contributor><comment>reverting breakage</comment><text xml:space="preserve" bytes="723">{{#ifeq:|yes

| Template:Ombox/core | Template:Ombox/core

}}</text><sha1>p9vh00dqvq0u1q3950ueg6abd93dyrt</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Ombox/core</title><ns>10</ns><id>93345</id><revision><id>680423</id><parentid>680422</parentid><timestamp>2013-04-29T09:31:02Z</timestamp><contributor><username>Siebrand</username><id>5665</id></contributor><minor/><comment>Protected "Template:Ombox/core": Highly visible template ([Edit=Allow only autoconfirmed users] (indefinite) [Move=Allow only autoconfirmed users] (indefinite))</comment><text xml:space="preserve" bytes="2250"> {{#ifeq:|none | | }}

{{#if: | {{#ifeq:|none

 | 
|
 }}

}}

{{#switch:move

| | critical | important | warning | caution | license | speedy | delete | content | style | move | protection | notice =

| #default =
This message box is using an invalid "type=move" parameter and needs fixing.
[[Category:Wikipedia message box parameter needs fixing|Template:Main otherTemplate:Mbox]]

}}</text><sha1>l3n9mp2c6ch14gekpe1oxxe8thp3xdb</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Para</title><ns>10</ns><id>40658</id><revision><id>557339</id><parentid>557338</parentid><timestamp>2012-06-30T23:27:18Z</timestamp><contributor><username>Reedy</username><id>28424</id></contributor><minor/><comment>1 revision from w:en:Template:Para</comment><text xml:space="preserve" bytes="238">|{{#if:|{{{1}}}=|}}</text><sha1>3ve3qhqjaafu9wuy6em7y1fz49qyqfx</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Purge</title><ns>10</ns><id>31341</id><revision><id>405355</id><parentid>405354</parentid><timestamp>2011-05-24T01:39:17Z</timestamp><contributor><username>Peachey88</username><id>31302</id></contributor><minor/><comment>1 revision from w:en:Template:Purge: update to en.wiki</comment><text xml:space="preserve" bytes="197">Purge</text><sha1>830osaj62tvmlh6zq374ixtzbukxcih</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Tl</title><ns>10</ns><id>12644</id><redirect title="Template:Tlx"/><revision><id>760820</id><parentid>760712</parentid><timestamp>2013-08-10T10:29:27Z</timestamp><contributor><username>IAlex</username><id>17961</id></contributor><minor/><comment>Reverted edits by 175.200.179.56 (talk) to last revision by Varnent</comment><text xml:space="preserve" bytes="25">#REDIRECTTemplate:Tlx</text><sha1>avv0qklcaxr8n5r45lcc2x17y9w78sc</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Tlx</title><ns>10</ns><id>20809</id><revision><id>557363</id><parentid>534113</parentid><timestamp>2012-06-30T23:27:22Z</timestamp><contributor><username>Reedy</username><id>28424</id></contributor><minor/><comment>1 revision from w:en:Template:Tlx</comment><text xml:space="preserve" bytes="385">{{[[Template:|]]{{#if:| |{{{2}}} }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}}</text><sha1>0d6b5bkc7j2tegvw2yzm4b6iil98xqg</sha1> <mediawiki xsi:schemaLocation="http://www.mediawiki.org/xml/export-0.8/ http://www.mediawiki.org/xml/export-0.8.xsd" version="0.8" xml:lang="en"><siteinfo><sitename>MediaWiki</sitename><base>http://www.mediawiki.org/wiki/MediaWiki</base><generator>MediaWiki 1.22wmf12</generator><case>first-letter</case><namespaces><namespace key="-2" case="first-letter">Media</namespace><namespace key="-1" case="first-letter">Special</namespace><namespace key="0" case="first-letter"/><namespace key="1" case="first-letter">Talk</namespace><namespace key="2" case="first-letter">User</namespace><namespace key="3" case="first-letter">User talk</namespace><namespace key="4" case="first-letter">Project</namespace><namespace key="5" case="first-letter">Project talk</namespace><namespace key="6" case="first-letter">File</namespace><namespace key="7" case="first-letter">File talk</namespace><namespace key="8" case="first-letter">MediaWiki</namespace><namespace key="9" case="first-letter">MediaWiki talk</namespace><namespace key="10" case="first-letter">Template</namespace><namespace key="11" case="first-letter">Template talk</namespace><namespace key="12" case="first-letter">Help</namespace><namespace key="13" case="first-letter">Help talk</namespace><namespace key="14" case="first-letter">Category</namespace><namespace key="15" case="first-letter">Category talk</namespace><namespace key="90" case="first-letter">Thread</namespace><namespace key="91" case="first-letter">Thread talk</namespace><namespace key="92" case="first-letter">Summary</namespace><namespace key="93" case="first-letter">Summary talk</namespace><namespace key="100" case="first-letter">Manual</namespace><namespace key="101" case="first-letter">Manual talk</namespace><namespace key="102" case="first-letter">Extension</namespace><namespace key="103" case="first-letter">Extension talk</namespace><namespace key="104" case="first-letter">API</namespace><namespace key="105" case="first-letter">API talk</namespace><namespace key="106" case="first-letter">Skin</namespace><namespace key="107" case="first-letter">Skin talk</namespace><namespace key="828" case="first-letter">Module</namespace><namespace key="829" case="first-letter">Module talk</namespace><namespace key="1198" case="first-letter">Translations</namespace><namespace key="1199" case="first-letter">Translations talk</namespace><namespace key="2500" case="first-letter">VisualEditor</namespace><namespace key="2501" case="first-letter">VisualEditor talk</namespace></namespaces></siteinfo><page><title>Template:Mbox</title><ns>10</ns><id>45372</id><revision><id>634882</id><parentid>634876</parentid><timestamp>2013-01-25T22:40:38Z</timestamp><contributor><username>Kaldari</username><id>31661</id></contributor><comment>reverting self, problem was in ombox template</comment><text xml:space="preserve" bytes="707">{{

 Template:Namespace detect

| type = protection | image = | imageright = | class = | style = | textstyle = | text = type=protection – Protection notices.. | small = | smallimage = | smallimageright = | smalltext = | subst = | date = | name = }}</text><sha1>40w6e1mdq2t695t9dv143e1rzq5pv1o</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation</title><ns>10</ns><id>20803</id><revision><id>688512</id><parentid>687083</parentid><timestamp>2013-05-11T17:18:34Z</timestamp><contributor><username>Wargo</username><id>25061</id></contributor><text xml:space="preserve" bytes="2079">{{#ifeq: Mbox | sandbox

|
Template:Template sandbox notice

}}Template:Documentation/start box2 {{#switch: {{#if:|1|0}}{{#if:|1|0}}{{#ifexist:|1|0}}{{#ifexist:Template:Documentation/docspace:Template:Documentation/template page/doc|1|0}} | 1000 | 1001 | 1010 | 1011 | 1100 | 1101 | 1110 | 1111 = | 0110 | 0111 = {{ {{{1}}} }} | 0001 | 0011 = {{ Template:Documentation/docspace:Template:Documentation/template page/doc }} | 0000 | 0100 | 0010 | 0101 = }} Template:Documentation/end box2</text><sha1>bvikrz5412m4gizkphh8ftj604e3kbf</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/docspace</title><ns>10</ns><id>93323</id><revision><id>631615</id><parentid>557279</parentid><timestamp>2013-01-20T15:55:26Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><minor/><comment>1 revision from w:en:Template:Documentation/docspace: Requested by average_drifter in #mediawiki</comment><text xml:space="preserve" bytes="302">{{#switch: Template

 | 
 | File
 | MediaWiki
 | Category = Template talk
 | #default = Template
}}</text><sha1>7f8iymss9sr4v7f4t5pza1arwjogrv3</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/end box</title><ns>10</ns><id>93324</id><revision><id>631856</id><parentid>631623</parentid><timestamp>2013-01-20T16:24:41Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><text xml:space="preserve" bytes="4124">

{{#if:

 {{#ifeq:  | off
 |
 | yes{{
   #switch: Template
   | User
   | Template = yes
   }}
 }}

| Template:Fmbox }}{{#if:

 {{#switch: Mbox
 | doc
 | testcases = strange
 }}

| [[Category:Wikipedia pages with strange ((documentation)) usage|Template:Main otherTemplate:Mbox]]

}}</text><sha1>r3qht4u0hwps2mqnst3puyi8anb9dmz</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/end box2</title><ns>10</ns><id>124329</id><revision><id>688362</id><parentid>688359</parentid><timestamp>2013-05-11T09:36:55Z</timestamp><contributor><username>Shirayuki</username><id>472859</id></contributor><comment>Undo revision 688359 by Shirayuki (talk)</comment><text xml:space="preserve" bytes="864">Template:Documentation/end box</text><sha1>sfe0ppdpxp1nwfzhpym4jwdtmgpph1p</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/start box</title><ns>10</ns><id>93326</id><revision><id>742132</id><parentid>742131</parentid><timestamp>2013-07-20T14:04:29Z</timestamp><contributor><ip>81.129.86.23</ip></contributor><text xml:space="preserve" bytes="2002">

{{#ifeq: ¬ |

|

|
{{#switch: ¬
 | ¬ =   
   {{#switch: Template 
   | Template = File:Template-info.png Template documentation
   | Template:Ns:Module = File:Template-info.png Module documentation
   | File = Summary
   | #default = Documentation
   }}
 | #default = 
   
 }}{{
 #if: 
 | 
 | 
   {{
   #if: yes
   | [view] [edit] [history] [[[:Template:Purge]]] 
   | 
     [#if:  _        | %7B%7B%7Bpreload%7D%7D%7D_        | {{#ifeq: Template | File_          | Template:Documentation/preload-filespace_          | Template:Documentation/preload_          }} }} create]
   }}
}}

}}</text><sha1>linb792zr3zrp72qrhjkmqg1mz6uevr</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/start box2</title><ns>10</ns><id>93327</id><revision><id>631642</id><parentid>585737</parentid><timestamp>2013-01-20T15:55:27Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><minor/><comment>4 revisions from w:en:Template:Documentation/start box2: Requested by average_drifter in #mediawiki</comment><text xml:space="preserve" bytes="625">Template:Documentation/start box</text><sha1>t5j6y918odlsx0iuls0qgi6wbl050q3</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/template page</title><ns>10</ns><id>93328</id><revision><id>631644</id><parentid>557289</parentid><timestamp>2013-01-20T15:55:27Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><minor/><comment>1 revision from w:en:Template:Documentation/template page: Requested by average_drifter in #mediawiki</comment><text xml:space="preserve" bytes="232">{{#switch: Mbox | sandbox | testcases = Mbox | #default = Mbox }}</text><sha1>fenc3r6oe2sito28b1d8xgyo9gpq5uf</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation subpage</title><ns>10</ns><id>20806</id><revision><id>757428</id><parentid>715052</parentid><timestamp>2013-08-05T14:14:46Z</timestamp><contributor><username>IAlex</username><id>17961</id></contributor><minor/><comment>Reverted edits by 90.219.4.40 (talk) to last revision by Shirayuki</comment><text xml:space="preserve" bytes="2616">{{#if: |

File:Edit-paste.svg This is the template documentation page for Template:Mbox.
This page may not be intended to be viewed directly.
Links using variables may appear broken; do not replace these with hardcoded page names or URLs.
{{#if:x||

}} |{{#ifeq: mbox | doc

 | 

{{

   #ifeq: show | show
   | Template loop detected: Template:Mbox
   }}{{
   #if: 
   | 
   | {{#ifeq:Template|Template|}}
 }}

| }}

}}</text><sha1>7a3si8r4k2z0aqxpbbxz1c0gmny5pb9</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Fmbox</title><ns>10</ns><id>37655</id><revision><id>558796</id><parentid>558707</parentid><timestamp>2012-07-05T06:11:26Z</timestamp><contributor><username>Krinkle</username><id>135822</id></contributor><comment>update from enwiki</comment><text xml:space="preserve" bytes="1344"> {{#ifeq:|none | | }}

{{#if:

|

}}

{{#switch:protection

| | warning | editnotice | system =

| #default =
This message box is using an invalid "type=protection" parameter and needs fixing.
[[Category:Wikipedia message box parameter needs fixing|Template:Main otherTemplate:Mbox]]

}}</text><sha1>mrldgfpkjyqf89ukmq2vy7gh3ir2j7i</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Mbox/doc</title><ns>10</ns><id>45374</id><revision><id>659649</id><parentid>651771</parentid><timestamp>2013-03-14T09:07:42Z</timestamp><contributor><username>Krinkle</username><id>135822</id></contributor><text xml:space="preserve" bytes="14176">Template:Documentation subpage This is the Template:Tl or message box meta-template.

It is used to build message box templates such as Template:Tl. It offers several different colours, uses default images if no image parameter is given and it has some other features.

This meta-template uses the mbox CSS classes in MediaWiki:Common.css. The classes can also be used directly in a wikitable if special functionality is needed. See the how-to guide for that.

Usage

Simple usage example:

{{mbox | text = Some text.}}

Template loop detected: Template:Mbox Complex example:

{{mbox
| type       = style
| small      = left
| image      = [[File:Emblem-question-yellow.svg|40px|alt=Question mark]]
| smallimage = [[File:Emblem-question-yellow.svg|20px|alt=Question mark]]
| textstyle  = color: red; font-weight: bold; font-style: italic;
| text       = Text for a big box, for the top of articles.
| smalltext  = Text for the top of article sections.
}}

Template loop detected: Template:Mbox

But you are not really supposed to use red bold italic text.

Message box types

The following examples use different type parameters but use no image parameters thus they use the default images for each type.

Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox

Other images

The default images shown above are mostly for convenience. In many cases it is more appropriate to use more specific images. These examples use the image parameter to specify an image other than the default images.

Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox

More examples

Some other parameter combinations.

Template loop detected: Template:Mbox Template loop detected: Template:Mbox

Template loop detected: Template:Mbox

Template loop detected: Template:Mbox

Parameters

List of all parameters:

{{mbox
| type  = critical / serious / warning / notice / / move / protection
| image = none / [[File:...|40px|...]]
| imagewidth = width of image section / default is 52px
| imageright = [[File:...|40px|...]]
| imagerightwidth = width of right image section / default is 52px
| style = CSS values
| textstyle = CSS values
| text  = The message body text.
| small = {{{small|}}} / left
| smallimage = none / [[File:...|20px|...]]
| smallimageright = none / [[File:...|20px|...]]
| smalltext  = A shorter message body text.
}}

type

If no type parameter is given the template has a 'blank' style.

image

No parameter = If no image parameter is given the template uses a default image. Which default image it uses depends on the type parameter.
An image = Should be an image with usual wiki notation. Widths of 40px - 50px are usually about right. (Images over 52 pixels wide will cause padding problems, unless you also set imagewidth.)
Often an icon is purely decorative in the W3C sense that it repeats the text. To improve accessibility, it is desirable to not have it be announced by screen readers, as well as to avoid it linking to an irrelevant page. If (and only if) the image license allows this, it can be marked with "Template:ParaTemplate:Para". For example:
image = [[File:Unbalanced scales.svg|40px|link=|alt=]]
Conversely, an icon that does not use "Template:ParaTemplate:Para", and which therefore is announced to visually impaired readers, should use an "Template:Para" parameter that describes the icon. With no Template:Para parameter (using the default link), the alt text should describe the icon's visual appearance. For example:
image = [[File:Gnome globe current event.svg|40px|alt=Clock over a larger globe]]
With a nonempty "Template:Para" the alt text should describe the icon's function. For example:
image = [[File:Purple question mark.svg|40px|link=Special:Random|alt=Random article]]
An icon whose license requires attribution may have alt text, but must keep the default link. Although public domain images do not require a link, many licenses do require one. Please see Purely decorative images for more information about licensing.
none = Means that no image is used.
blank = This parameter is now deprecated. If you see it in use, change it to "image=none".

imagewidth

Optional CSS value used to set width of image's div section. Allowing you to use images wider than the default 52px wide.
Example
imagewidth=100px

imageright

No parameter = If no imageright parameter is given then no image is shown on the right side.
An image = Should be an image with usual wiki notation. 40px - 50px width are usually about right depending on the image height to width ratio. (Images over 52 pixels width will cause padding problems, unless you also set imagerightwidth.) For example:
imageright = [[File:Nuvola apps bookcase.png|40px|alt=Three stacked books]]
Anything = Any other object that you want to show on the right side.

imagerightwidth

Optional CSS value used to set width of image's div section. Allowing you to use images wider than the default 52px wide.
Example
imagerightwidth=100px

style

Optional CSS values used by the entire message box table. Without quotation marks " " but with the ending semicolons ;. For example:
style = margin-bottom: 0.5em;

textstyle

Optional CSS values used by the text cell. For example:
textstyle = text-align: center;

text

The message body text.

The small parameters

The small article message boxes are meant for the top of sections. Normally they should only contain one or two lines of text.

small

left = Makes it a smaller left aligned message box. This also makes the default images smaller. Note that any data fed to the smallimage, smallimageright and smalltext parameters is only used if "small=left". To make it so your template also understands the small parameter you can use this code:
small = {{{small|}}}

Template loop detected: Template:Mbox Template loop detected: Template:Mbox

smallimage

No parameter = If no smallimage parameter is given then this template falls back to use the image parameter. If the image parameter also is empty then a small default image is used.
An image = Should be an image with usual wiki notation. 20px width is usually about right for boxes with one line of text, while 25px width is usually about right for boxes with two lines of text. For example:
smallimage = [[File:Gnome globe current event.svg|20px|alt=Clock over a larger globe]]
none = Means that no image is used. This overrides any image fed to image, when "small=left".

Template loop detected: Template:Mbox

smallimageright

No parameter = If no smallimageright parameter is given then this template falls back to use the imageright parameter. If the imageright parameter also is empty then no image is shown on the right side.
An image = Should be an image with usual wiki notation. 20px - 25px width is usually about right. For example:
smallimageright = [[File:Nuvola apps bookcase.png|20px|alt=Three stacked books]]
Anything = Any other object that you want to show on the right side.
none = Means that no right side image is used. This overrides any image fed to imageright, when "small=left".

Template loop detected: Template:Mbox

smalltext

A shorter version of the message body text. If no smalltext parameter is given then this template falls back to use the text parameter.

Technical details

If you need to use special characters in the text parameter then you need to escape them like this:

{{mbox
| text  = <div>
Equal sign = and a start and end brace { } work fine as they are.
But here is a pipe &#124; and two end braces <nowiki>}}</nowiki>.
And now a pipe and end braces <nowiki>|}}</nowiki>.
</div>
}}

Template loop detected: Template:Mbox

The <div> tags that surround the text in the example above are usually not needed. But if the text contains line breaks then sometimes we get weird line spacing. This especially happens when using vertical dotted lists. Then use the div tags to fix that.

This template uses CSS classes in MediaWiki:Common.css for most of its looks, thus it is fully skinnable.

This template calls Template:Tl which holds most of the code for Template:Tl, while Template:Tl itself does parameter preprocessing.

Internally this meta-template uses HTML wikimarkup instead of wikimarkup for the table code. That is the usual way we make meta-templates since wikimarkup has several drawbacks. For instance it makes it harder to use parser functions and some special characters in parameters.

The default images for this meta-template are in png format instead of svg format. The main reason is that some older web browsers have trouble with the transparent background that MediaWiki renders for svg images. The png images here have hand optimised transparent background colour so they look good in all browsers. Note that svg icons only look somewhat bad in the old browsers, thus such hand optimisation is only worth the trouble for very widely used icons.

For more technical details see the talk page and the "See also" links below.

See also

Template:Mbox templates Other pages:

</text><sha1>5cafb545bbublgg4mei08dvwxs9zay9</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Mbox templates</title><ns>10</ns><id>95150</id><revision><id>692773</id><parentid>565939</parentid><timestamp>2013-05-21T16:37:34Z</timestamp><contributor><ip>90.209.78.127</ip></contributor><text xml:space="preserve" bytes="268">Template:Nmbox</text><sha1>mm2hquqpmw1k85xftye00jkid2a0l4u</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Namespace detect</title><ns>10</ns><id>79689</id><revision><id>695915</id><parentid>497627</parentid><timestamp>2013-05-27T09:23:36Z</timestamp><contributor><ip>81.129.84.113</ip></contributor><text xml:space="preserve" bytes="1470">{{#switch:

 {{#if: 
   | {{{demospace}}}
   | {{#if: 
     | 
       {{#ifeq:|
       | talk
       |  
       }}
     | 
       {{#ifeq:template|template talk
       | talk
       | template 
       }}
     }}
   }}

| main | = | talk = | user = | project = | file | image = | mediawiki = | template = | help = | category = | book = | extension = | other | #default =

}}</text><sha1>qry2n28n1p12gxaxgu7gs1bkzywbpqv</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Nmbox</title><ns>10</ns><id>47495</id><revision><id>556782</id><parentid>328128</parentid><timestamp>2012-06-29T10:35:15Z</timestamp><contributor><username>Krinkle</username><id>135822</id></contributor><text xml:space="preserve" bytes="587"> {{#if: | |

}}

type=protection – Protection notices..
</text><sha1>6k7jc6wiy6i7qy82dd4dw1xja6e8k5w</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Ombox</title><ns>10</ns><id>93344</id><revision><id>634878</id><parentid>634793</parentid><timestamp>2013-01-25T22:39:30Z</timestamp><contributor><username>Kaldari</username><id>31661</id></contributor><comment>reverting breakage</comment><text xml:space="preserve" bytes="723">{{#ifeq:|yes

| Template:Ombox/core | Template:Ombox/core

}}</text><sha1>p9vh00dqvq0u1q3950ueg6abd93dyrt</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Ombox/core</title><ns>10</ns><id>93345</id><revision><id>680423</id><parentid>680422</parentid><timestamp>2013-04-29T09:31:02Z</timestamp><contributor><username>Siebrand</username><id>5665</id></contributor><minor/><comment>Protected "Template:Ombox/core": Highly visible template ([Edit=Allow only autoconfirmed users] (indefinite) [Move=Allow only autoconfirmed users] (indefinite))</comment><text xml:space="preserve" bytes="2250"> {{#ifeq:|none | | }}

{{#if: | {{#ifeq:|none

 | 
|
 }}

}}

{{#switch:protection

| | critical | important | warning | caution | license | speedy | delete | content | style | move | protection | notice =

| #default =
This message box is using an invalid "type=protection" parameter and needs fixing.
[[Category:Wikipedia message box parameter needs fixing|Template:Main otherTemplate:Mbox]]

}}</text><sha1>l3n9mp2c6ch14gekpe1oxxe8thp3xdb</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Para</title><ns>10</ns><id>40658</id><revision><id>557339</id><parentid>557338</parentid><timestamp>2012-06-30T23:27:18Z</timestamp><contributor><username>Reedy</username><id>28424</id></contributor><minor/><comment>1 revision from w:en:Template:Para</comment><text xml:space="preserve" bytes="238">|{{#if:|{{{1}}}=|}}</text><sha1>3ve3qhqjaafu9wuy6em7y1fz49qyqfx</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Purge</title><ns>10</ns><id>31341</id><revision><id>405355</id><parentid>405354</parentid><timestamp>2011-05-24T01:39:17Z</timestamp><contributor><username>Peachey88</username><id>31302</id></contributor><minor/><comment>1 revision from w:en:Template:Purge: update to en.wiki</comment><text xml:space="preserve" bytes="197">Purge</text><sha1>830osaj62tvmlh6zq374ixtzbukxcih</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Tl</title><ns>10</ns><id>12644</id><redirect title="Template:Tlx"/><revision><id>760820</id><parentid>760712</parentid><timestamp>2013-08-10T10:29:27Z</timestamp><contributor><username>IAlex</username><id>17961</id></contributor><minor/><comment>Reverted edits by 175.200.179.56 (talk) to last revision by Varnent</comment><text xml:space="preserve" bytes="25">#REDIRECTTemplate:Tlx</text><sha1>avv0qklcaxr8n5r45lcc2x17y9w78sc</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Tlx</title><ns>10</ns><id>20809</id><revision><id>557363</id><parentid>534113</parentid><timestamp>2012-06-30T23:27:22Z</timestamp><contributor><username>Reedy</username><id>28424</id></contributor><minor/><comment>1 revision from w:en:Template:Tlx</comment><text xml:space="preserve" bytes="385">{{[[Template:|]]{{#if:| |{{{2}}} }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}}</text><sha1>0d6b5bkc7j2tegvw2yzm4b6iil98xqg</sha1> <mediawiki xsi:schemaLocation="http://www.mediawiki.org/xml/export-0.8/ http://www.mediawiki.org/xml/export-0.8.xsd" version="0.8" xml:lang="en"><siteinfo><sitename>MediaWiki</sitename><base>http://www.mediawiki.org/wiki/MediaWiki</base><generator>MediaWiki 1.22wmf12</generator><case>first-letter</case><namespaces><namespace key="-2" case="first-letter">Media</namespace><namespace key="-1" case="first-letter">Special</namespace><namespace key="0" case="first-letter"/><namespace key="1" case="first-letter">Talk</namespace><namespace key="2" case="first-letter">User</namespace><namespace key="3" case="first-letter">User talk</namespace><namespace key="4" case="first-letter">Project</namespace><namespace key="5" case="first-letter">Project talk</namespace><namespace key="6" case="first-letter">File</namespace><namespace key="7" case="first-letter">File talk</namespace><namespace key="8" case="first-letter">MediaWiki</namespace><namespace key="9" case="first-letter">MediaWiki talk</namespace><namespace key="10" case="first-letter">Template</namespace><namespace key="11" case="first-letter">Template talk</namespace><namespace key="12" case="first-letter">Help</namespace><namespace key="13" case="first-letter">Help talk</namespace><namespace key="14" case="first-letter">Category</namespace><namespace key="15" case="first-letter">Category talk</namespace><namespace key="90" case="first-letter">Thread</namespace><namespace key="91" case="first-letter">Thread talk</namespace><namespace key="92" case="first-letter">Summary</namespace><namespace key="93" case="first-letter">Summary talk</namespace><namespace key="100" case="first-letter">Manual</namespace><namespace key="101" case="first-letter">Manual talk</namespace><namespace key="102" case="first-letter">Extension</namespace><namespace key="103" case="first-letter">Extension talk</namespace><namespace key="104" case="first-letter">API</namespace><namespace key="105" case="first-letter">API talk</namespace><namespace key="106" case="first-letter">Skin</namespace><namespace key="107" case="first-letter">Skin talk</namespace><namespace key="828" case="first-letter">Module</namespace><namespace key="829" case="first-letter">Module talk</namespace><namespace key="1198" case="first-letter">Translations</namespace><namespace key="1199" case="first-letter">Translations talk</namespace><namespace key="2500" case="first-letter">VisualEditor</namespace><namespace key="2501" case="first-letter">VisualEditor talk</namespace></namespaces></siteinfo><page><title>Template:Mbox</title><ns>10</ns><id>45372</id><revision><id>634882</id><parentid>634876</parentid><timestamp>2013-01-25T22:40:38Z</timestamp><contributor><username>Kaldari</username><id>31661</id></contributor><comment>reverting self, problem was in ombox template</comment><text xml:space="preserve" bytes="707">{{

 Template:Namespace detect

| type = license | image = | imageright = | class = | style = | textstyle = | text = type=license – License notices, such as Template:Tl | small = | smallimage = | smallimageright = | smalltext = | subst = | date = | name = }}</text><sha1>40w6e1mdq2t695t9dv143e1rzq5pv1o</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation</title><ns>10</ns><id>20803</id><revision><id>688512</id><parentid>687083</parentid><timestamp>2013-05-11T17:18:34Z</timestamp><contributor><username>Wargo</username><id>25061</id></contributor><text xml:space="preserve" bytes="2079">{{#ifeq: Mbox | sandbox

|
Template:Template sandbox notice

}}Template:Documentation/start box2 {{#switch: {{#if:|1|0}}{{#if:|1|0}}{{#ifexist:|1|0}}{{#ifexist:Template:Documentation/docspace:Template:Documentation/template page/doc|1|0}} | 1000 | 1001 | 1010 | 1011 | 1100 | 1101 | 1110 | 1111 = | 0110 | 0111 = {{ {{{1}}} }} | 0001 | 0011 = {{ Template:Documentation/docspace:Template:Documentation/template page/doc }} | 0000 | 0100 | 0010 | 0101 = }} Template:Documentation/end box2</text><sha1>bvikrz5412m4gizkphh8ftj604e3kbf</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/docspace</title><ns>10</ns><id>93323</id><revision><id>631615</id><parentid>557279</parentid><timestamp>2013-01-20T15:55:26Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><minor/><comment>1 revision from w:en:Template:Documentation/docspace: Requested by average_drifter in #mediawiki</comment><text xml:space="preserve" bytes="302">{{#switch: Template

 | 
 | File
 | MediaWiki
 | Category = Template talk
 | #default = Template
}}</text><sha1>7f8iymss9sr4v7f4t5pza1arwjogrv3</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/end box</title><ns>10</ns><id>93324</id><revision><id>631856</id><parentid>631623</parentid><timestamp>2013-01-20T16:24:41Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><text xml:space="preserve" bytes="4124">

{{#if:

 {{#ifeq:  | off
 |
 | yes{{
   #switch: Template
   | User
   | Template = yes
   }}
 }}

| Template:Fmbox }}{{#if:

 {{#switch: Mbox
 | doc
 | testcases = strange
 }}

| [[Category:Wikipedia pages with strange ((documentation)) usage|Template:Main otherTemplate:Mbox]]

}}</text><sha1>r3qht4u0hwps2mqnst3puyi8anb9dmz</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/end box2</title><ns>10</ns><id>124329</id><revision><id>688362</id><parentid>688359</parentid><timestamp>2013-05-11T09:36:55Z</timestamp><contributor><username>Shirayuki</username><id>472859</id></contributor><comment>Undo revision 688359 by Shirayuki (talk)</comment><text xml:space="preserve" bytes="864">Template:Documentation/end box</text><sha1>sfe0ppdpxp1nwfzhpym4jwdtmgpph1p</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/start box</title><ns>10</ns><id>93326</id><revision><id>742132</id><parentid>742131</parentid><timestamp>2013-07-20T14:04:29Z</timestamp><contributor><ip>81.129.86.23</ip></contributor><text xml:space="preserve" bytes="2002">

{{#ifeq: ¬ |

|

|
{{#switch: ¬
 | ¬ =   
   {{#switch: Template 
   | Template = File:Template-info.png Template documentation
   | Template:Ns:Module = File:Template-info.png Module documentation
   | File = Summary
   | #default = Documentation
   }}
 | #default = 
   
 }}{{
 #if: 
 | 
 | 
   {{
   #if: yes
   | [view] [edit] [history] [[[:Template:Purge]]] 
   | 
     [#if:  _        | %7B%7B%7Bpreload%7D%7D%7D_        | {{#ifeq: Template | File_          | Template:Documentation/preload-filespace_          | Template:Documentation/preload_          }} }} create]
   }}
}}

}}</text><sha1>linb792zr3zrp72qrhjkmqg1mz6uevr</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/start box2</title><ns>10</ns><id>93327</id><revision><id>631642</id><parentid>585737</parentid><timestamp>2013-01-20T15:55:27Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><minor/><comment>4 revisions from w:en:Template:Documentation/start box2: Requested by average_drifter in #mediawiki</comment><text xml:space="preserve" bytes="625">Template:Documentation/start box</text><sha1>t5j6y918odlsx0iuls0qgi6wbl050q3</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/template page</title><ns>10</ns><id>93328</id><revision><id>631644</id><parentid>557289</parentid><timestamp>2013-01-20T15:55:27Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><minor/><comment>1 revision from w:en:Template:Documentation/template page: Requested by average_drifter in #mediawiki</comment><text xml:space="preserve" bytes="232">{{#switch: Mbox | sandbox | testcases = Mbox | #default = Mbox }}</text><sha1>fenc3r6oe2sito28b1d8xgyo9gpq5uf</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation subpage</title><ns>10</ns><id>20806</id><revision><id>757428</id><parentid>715052</parentid><timestamp>2013-08-05T14:14:46Z</timestamp><contributor><username>IAlex</username><id>17961</id></contributor><minor/><comment>Reverted edits by 90.219.4.40 (talk) to last revision by Shirayuki</comment><text xml:space="preserve" bytes="2616">{{#if: |

File:Edit-paste.svg This is the template documentation page for Template:Mbox.
This page may not be intended to be viewed directly.
Links using variables may appear broken; do not replace these with hardcoded page names or URLs.
{{#if:x||

}} |{{#ifeq: mbox | doc

 | 

{{

   #ifeq: show | show
   | Template loop detected: Template:Mbox
   }}{{
   #if: 
   | 
   | {{#ifeq:Template|Template|}}
 }}

| }}

}}</text><sha1>7a3si8r4k2z0aqxpbbxz1c0gmny5pb9</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Fmbox</title><ns>10</ns><id>37655</id><revision><id>558796</id><parentid>558707</parentid><timestamp>2012-07-05T06:11:26Z</timestamp><contributor><username>Krinkle</username><id>135822</id></contributor><comment>update from enwiki</comment><text xml:space="preserve" bytes="1344"> {{#ifeq:|none | | }}

{{#if:

|

}}

{{#switch:license

| | warning | editnotice | system =

| #default =
This message box is using an invalid "type=license" parameter and needs fixing.
[[Category:Wikipedia message box parameter needs fixing|Template:Main otherTemplate:Mbox]]

}}</text><sha1>mrldgfpkjyqf89ukmq2vy7gh3ir2j7i</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Mbox/doc</title><ns>10</ns><id>45374</id><revision><id>659649</id><parentid>651771</parentid><timestamp>2013-03-14T09:07:42Z</timestamp><contributor><username>Krinkle</username><id>135822</id></contributor><text xml:space="preserve" bytes="14176">Template:Documentation subpage This is the Template:Tl or message box meta-template.

It is used to build message box templates such as Template:Tl. It offers several different colours, uses default images if no image parameter is given and it has some other features.

This meta-template uses the mbox CSS classes in MediaWiki:Common.css. The classes can also be used directly in a wikitable if special functionality is needed. See the how-to guide for that.

Usage

Simple usage example:

{{mbox | text = Some text.}}

Template loop detected: Template:Mbox Complex example:

{{mbox
| type       = style
| small      = left
| image      = [[File:Emblem-question-yellow.svg|40px|alt=Question mark]]
| smallimage = [[File:Emblem-question-yellow.svg|20px|alt=Question mark]]
| textstyle  = color: red; font-weight: bold; font-style: italic;
| text       = Text for a big box, for the top of articles.
| smalltext  = Text for the top of article sections.
}}

Template loop detected: Template:Mbox

But you are not really supposed to use red bold italic text.

Message box types

The following examples use different type parameters but use no image parameters thus they use the default images for each type.

Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox

Other images

The default images shown above are mostly for convenience. In many cases it is more appropriate to use more specific images. These examples use the image parameter to specify an image other than the default images.

Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox

More examples

Some other parameter combinations.

Template loop detected: Template:Mbox Template loop detected: Template:Mbox

Template loop detected: Template:Mbox

Template loop detected: Template:Mbox

Parameters

List of all parameters:

{{mbox
| type  = critical / serious / warning / notice / / move / protection
| image = none / [[File:...|40px|...]]
| imagewidth = width of image section / default is 52px
| imageright = [[File:...|40px|...]]
| imagerightwidth = width of right image section / default is 52px
| style = CSS values
| textstyle = CSS values
| text  = The message body text.
| small = {{{small|}}} / left
| smallimage = none / [[File:...|20px|...]]
| smallimageright = none / [[File:...|20px|...]]
| smalltext  = A shorter message body text.
}}

type

If no type parameter is given the template has a 'blank' style.

image

No parameter = If no image parameter is given the template uses a default image. Which default image it uses depends on the type parameter.
An image = Should be an image with usual wiki notation. Widths of 40px - 50px are usually about right. (Images over 52 pixels wide will cause padding problems, unless you also set imagewidth.)
Often an icon is purely decorative in the W3C sense that it repeats the text. To improve accessibility, it is desirable to not have it be announced by screen readers, as well as to avoid it linking to an irrelevant page. If (and only if) the image license allows this, it can be marked with "Template:ParaTemplate:Para". For example:
image = [[File:Unbalanced scales.svg|40px|link=|alt=]]
Conversely, an icon that does not use "Template:ParaTemplate:Para", and which therefore is announced to visually impaired readers, should use an "Template:Para" parameter that describes the icon. With no Template:Para parameter (using the default link), the alt text should describe the icon's visual appearance. For example:
image = [[File:Gnome globe current event.svg|40px|alt=Clock over a larger globe]]
With a nonempty "Template:Para" the alt text should describe the icon's function. For example:
image = [[File:Purple question mark.svg|40px|link=Special:Random|alt=Random article]]
An icon whose license requires attribution may have alt text, but must keep the default link. Although public domain images do not require a link, many licenses do require one. Please see Purely decorative images for more information about licensing.
none = Means that no image is used.
blank = This parameter is now deprecated. If you see it in use, change it to "image=none".

imagewidth

Optional CSS value used to set width of image's div section. Allowing you to use images wider than the default 52px wide.
Example
imagewidth=100px

imageright

No parameter = If no imageright parameter is given then no image is shown on the right side.
An image = Should be an image with usual wiki notation. 40px - 50px width are usually about right depending on the image height to width ratio. (Images over 52 pixels width will cause padding problems, unless you also set imagerightwidth.) For example:
imageright = [[File:Nuvola apps bookcase.png|40px|alt=Three stacked books]]
Anything = Any other object that you want to show on the right side.

imagerightwidth

Optional CSS value used to set width of image's div section. Allowing you to use images wider than the default 52px wide.
Example
imagerightwidth=100px

style

Optional CSS values used by the entire message box table. Without quotation marks " " but with the ending semicolons ;. For example:
style = margin-bottom: 0.5em;

textstyle

Optional CSS values used by the text cell. For example:
textstyle = text-align: center;

text

The message body text.

The small parameters

The small article message boxes are meant for the top of sections. Normally they should only contain one or two lines of text.

small

left = Makes it a smaller left aligned message box. This also makes the default images smaller. Note that any data fed to the smallimage, smallimageright and smalltext parameters is only used if "small=left". To make it so your template also understands the small parameter you can use this code:
small = {{{small|}}}

Template loop detected: Template:Mbox Template loop detected: Template:Mbox

smallimage

No parameter = If no smallimage parameter is given then this template falls back to use the image parameter. If the image parameter also is empty then a small default image is used.
An image = Should be an image with usual wiki notation. 20px width is usually about right for boxes with one line of text, while 25px width is usually about right for boxes with two lines of text. For example:
smallimage = [[File:Gnome globe current event.svg|20px|alt=Clock over a larger globe]]
none = Means that no image is used. This overrides any image fed to image, when "small=left".

Template loop detected: Template:Mbox

smallimageright

No parameter = If no smallimageright parameter is given then this template falls back to use the imageright parameter. If the imageright parameter also is empty then no image is shown on the right side.
An image = Should be an image with usual wiki notation. 20px - 25px width is usually about right. For example:
smallimageright = [[File:Nuvola apps bookcase.png|20px|alt=Three stacked books]]
Anything = Any other object that you want to show on the right side.
none = Means that no right side image is used. This overrides any image fed to imageright, when "small=left".

Template loop detected: Template:Mbox

smalltext

A shorter version of the message body text. If no smalltext parameter is given then this template falls back to use the text parameter.

Technical details

If you need to use special characters in the text parameter then you need to escape them like this:

{{mbox
| text  = <div>
Equal sign = and a start and end brace { } work fine as they are.
But here is a pipe &#124; and two end braces <nowiki>}}</nowiki>.
And now a pipe and end braces <nowiki>|}}</nowiki>.
</div>
}}

Template loop detected: Template:Mbox

The <div> tags that surround the text in the example above are usually not needed. But if the text contains line breaks then sometimes we get weird line spacing. This especially happens when using vertical dotted lists. Then use the div tags to fix that.

This template uses CSS classes in MediaWiki:Common.css for most of its looks, thus it is fully skinnable.

This template calls Template:Tl which holds most of the code for Template:Tl, while Template:Tl itself does parameter preprocessing.

Internally this meta-template uses HTML wikimarkup instead of wikimarkup for the table code. That is the usual way we make meta-templates since wikimarkup has several drawbacks. For instance it makes it harder to use parser functions and some special characters in parameters.

The default images for this meta-template are in png format instead of svg format. The main reason is that some older web browsers have trouble with the transparent background that MediaWiki renders for svg images. The png images here have hand optimised transparent background colour so they look good in all browsers. Note that svg icons only look somewhat bad in the old browsers, thus such hand optimisation is only worth the trouble for very widely used icons.

For more technical details see the talk page and the "See also" links below.

See also

Template:Mbox templates Other pages:

</text><sha1>5cafb545bbublgg4mei08dvwxs9zay9</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Mbox templates</title><ns>10</ns><id>95150</id><revision><id>692773</id><parentid>565939</parentid><timestamp>2013-05-21T16:37:34Z</timestamp><contributor><ip>90.209.78.127</ip></contributor><text xml:space="preserve" bytes="268">Template:Nmbox</text><sha1>mm2hquqpmw1k85xftye00jkid2a0l4u</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Namespace detect</title><ns>10</ns><id>79689</id><revision><id>695915</id><parentid>497627</parentid><timestamp>2013-05-27T09:23:36Z</timestamp><contributor><ip>81.129.84.113</ip></contributor><text xml:space="preserve" bytes="1470">{{#switch:

 {{#if: 
   | {{{demospace}}}
   | {{#if: 
     | 
       {{#ifeq:|
       | talk
       |  
       }}
     | 
       {{#ifeq:template|template talk
       | talk
       | template 
       }}
     }}
   }}

| main | = | talk = | user = | project = | file | image = | mediawiki = | template = | help = | category = | book = | extension = | other | #default =

}}</text><sha1>qry2n28n1p12gxaxgu7gs1bkzywbpqv</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Nmbox</title><ns>10</ns><id>47495</id><revision><id>556782</id><parentid>328128</parentid><timestamp>2012-06-29T10:35:15Z</timestamp><contributor><username>Krinkle</username><id>135822</id></contributor><text xml:space="preserve" bytes="587"> {{#if: | |

}}

type=license – License notices, such as Template:Tl
</text><sha1>6k7jc6wiy6i7qy82dd4dw1xja6e8k5w</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Ombox</title><ns>10</ns><id>93344</id><revision><id>634878</id><parentid>634793</parentid><timestamp>2013-01-25T22:39:30Z</timestamp><contributor><username>Kaldari</username><id>31661</id></contributor><comment>reverting breakage</comment><text xml:space="preserve" bytes="723">{{#ifeq:|yes

| Template:Ombox/core | Template:Ombox/core

}}</text><sha1>p9vh00dqvq0u1q3950ueg6abd93dyrt</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Ombox/core</title><ns>10</ns><id>93345</id><revision><id>680423</id><parentid>680422</parentid><timestamp>2013-04-29T09:31:02Z</timestamp><contributor><username>Siebrand</username><id>5665</id></contributor><minor/><comment>Protected "Template:Ombox/core": Highly visible template ([Edit=Allow only autoconfirmed users] (indefinite) [Move=Allow only autoconfirmed users] (indefinite))</comment><text xml:space="preserve" bytes="2250"> {{#ifeq:|none | | }}

{{#if: | {{#ifeq:|none

 | 
|
 }}

}}

{{#switch:license

| | critical | important | warning | caution | license | speedy | delete | content | style | move | protection | notice =

| #default =
This message box is using an invalid "type=license" parameter and needs fixing.
[[Category:Wikipedia message box parameter needs fixing|Template:Main otherTemplate:Mbox]]

}}</text><sha1>l3n9mp2c6ch14gekpe1oxxe8thp3xdb</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Para</title><ns>10</ns><id>40658</id><revision><id>557339</id><parentid>557338</parentid><timestamp>2012-06-30T23:27:18Z</timestamp><contributor><username>Reedy</username><id>28424</id></contributor><minor/><comment>1 revision from w:en:Template:Para</comment><text xml:space="preserve" bytes="238">|{{#if:|{{{1}}}=|}}</text><sha1>3ve3qhqjaafu9wuy6em7y1fz49qyqfx</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Purge</title><ns>10</ns><id>31341</id><revision><id>405355</id><parentid>405354</parentid><timestamp>2011-05-24T01:39:17Z</timestamp><contributor><username>Peachey88</username><id>31302</id></contributor><minor/><comment>1 revision from w:en:Template:Purge: update to en.wiki</comment><text xml:space="preserve" bytes="197">Purge</text><sha1>830osaj62tvmlh6zq374ixtzbukxcih</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Tl</title><ns>10</ns><id>12644</id><redirect title="Template:Tlx"/><revision><id>760820</id><parentid>760712</parentid><timestamp>2013-08-10T10:29:27Z</timestamp><contributor><username>IAlex</username><id>17961</id></contributor><minor/><comment>Reverted edits by 175.200.179.56 (talk) to last revision by Varnent</comment><text xml:space="preserve" bytes="25">#REDIRECTTemplate:Tlx</text><sha1>avv0qklcaxr8n5r45lcc2x17y9w78sc</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Tlx</title><ns>10</ns><id>20809</id><revision><id>557363</id><parentid>534113</parentid><timestamp>2012-06-30T23:27:22Z</timestamp><contributor><username>Reedy</username><id>28424</id></contributor><minor/><comment>1 revision from w:en:Template:Tlx</comment><text xml:space="preserve" bytes="385">{{[[Template:|]]{{#if:| |{{{2}}} }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}}</text><sha1>0d6b5bkc7j2tegvw2yzm4b6iil98xqg</sha1>

Other images

The default images shown above are mostly for convenience. In many cases it is more appropriate to use more specific images. These examples use the image parameter to specify an image other than the default images.

<mediawiki xsi:schemaLocation="http://www.mediawiki.org/xml/export-0.8/ http://www.mediawiki.org/xml/export-0.8.xsd" version="0.8" xml:lang="en"><siteinfo><sitename>MediaWiki</sitename><base>http://www.mediawiki.org/wiki/MediaWiki</base><generator>MediaWiki 1.22wmf12</generator><case>first-letter</case><namespaces><namespace key="-2" case="first-letter">Media</namespace><namespace key="-1" case="first-letter">Special</namespace><namespace key="0" case="first-letter"/><namespace key="1" case="first-letter">Talk</namespace><namespace key="2" case="first-letter">User</namespace><namespace key="3" case="first-letter">User talk</namespace><namespace key="4" case="first-letter">Project</namespace><namespace key="5" case="first-letter">Project talk</namespace><namespace key="6" case="first-letter">File</namespace><namespace key="7" case="first-letter">File talk</namespace><namespace key="8" case="first-letter">MediaWiki</namespace><namespace key="9" case="first-letter">MediaWiki talk</namespace><namespace key="10" case="first-letter">Template</namespace><namespace key="11" case="first-letter">Template talk</namespace><namespace key="12" case="first-letter">Help</namespace><namespace key="13" case="first-letter">Help talk</namespace><namespace key="14" case="first-letter">Category</namespace><namespace key="15" case="first-letter">Category talk</namespace><namespace key="90" case="first-letter">Thread</namespace><namespace key="91" case="first-letter">Thread talk</namespace><namespace key="92" case="first-letter">Summary</namespace><namespace key="93" case="first-letter">Summary talk</namespace><namespace key="100" case="first-letter">Manual</namespace><namespace key="101" case="first-letter">Manual talk</namespace><namespace key="102" case="first-letter">Extension</namespace><namespace key="103" case="first-letter">Extension talk</namespace><namespace key="104" case="first-letter">API</namespace><namespace key="105" case="first-letter">API talk</namespace><namespace key="106" case="first-letter">Skin</namespace><namespace key="107" case="first-letter">Skin talk</namespace><namespace key="828" case="first-letter">Module</namespace><namespace key="829" case="first-letter">Module talk</namespace><namespace key="1198" case="first-letter">Translations</namespace><namespace key="1199" case="first-letter">Translations talk</namespace><namespace key="2500" case="first-letter">VisualEditor</namespace><namespace key="2501" case="first-letter">VisualEditor talk</namespace></namespaces></siteinfo><page><title>Template:Mbox</title><ns>10</ns><id>45372</id><revision><id>634882</id><parentid>634876</parentid><timestamp>2013-01-25T22:40:38Z</timestamp><contributor><username>Kaldari</username><id>31661</id></contributor><comment>reverting self, problem was in ombox template</comment><text xml:space="preserve" bytes="707">{{

 Template:Namespace detect

| type = warning | image = File:Unbalanced scales.svg | imageright = | class = | style = | textstyle = | text = type = content
image = [[File:Unbalanced scales.svg|40px|link=|alt=]]
This image is often used for Template:Tl and similar issues. | small = | smallimage = | smallimageright = | smalltext = | subst = | date = | name = }}</text><sha1>40w6e1mdq2t695t9dv143e1rzq5pv1o</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation</title><ns>10</ns><id>20803</id><revision><id>688512</id><parentid>687083</parentid><timestamp>2013-05-11T17:18:34Z</timestamp><contributor><username>Wargo</username><id>25061</id></contributor><text xml:space="preserve" bytes="2079">{{#ifeq: Mbox | sandbox

|
Template:Template sandbox notice

}}Template:Documentation/start box2 {{#switch: {{#if:|1|0}}{{#if:|1|0}}{{#ifexist:|1|0}}{{#ifexist:Template:Documentation/docspace:Template:Documentation/template page/doc|1|0}} | 1000 | 1001 | 1010 | 1011 | 1100 | 1101 | 1110 | 1111 = | 0110 | 0111 = {{ {{{1}}} }} | 0001 | 0011 = {{ Template:Documentation/docspace:Template:Documentation/template page/doc }} | 0000 | 0100 | 0010 | 0101 = }} Template:Documentation/end box2</text><sha1>bvikrz5412m4gizkphh8ftj604e3kbf</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/docspace</title><ns>10</ns><id>93323</id><revision><id>631615</id><parentid>557279</parentid><timestamp>2013-01-20T15:55:26Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><minor/><comment>1 revision from w:en:Template:Documentation/docspace: Requested by average_drifter in #mediawiki</comment><text xml:space="preserve" bytes="302">{{#switch: Template

 | 
 | File
 | MediaWiki
 | Category = Template talk
 | #default = Template
}}</text><sha1>7f8iymss9sr4v7f4t5pza1arwjogrv3</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/end box</title><ns>10</ns><id>93324</id><revision><id>631856</id><parentid>631623</parentid><timestamp>2013-01-20T16:24:41Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><text xml:space="preserve" bytes="4124">

{{#if:

 {{#ifeq:  | off
 |
 | yes{{
   #switch: Template
   | User
   | Template = yes
   }}
 }}

| Template:Fmbox }}{{#if:

 {{#switch: Mbox
 | doc
 | testcases = strange
 }}

| [[Category:Wikipedia pages with strange ((documentation)) usage|Template:Main otherTemplate:Mbox]]

}}</text><sha1>r3qht4u0hwps2mqnst3puyi8anb9dmz</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/end box2</title><ns>10</ns><id>124329</id><revision><id>688362</id><parentid>688359</parentid><timestamp>2013-05-11T09:36:55Z</timestamp><contributor><username>Shirayuki</username><id>472859</id></contributor><comment>Undo revision 688359 by Shirayuki (talk)</comment><text xml:space="preserve" bytes="864">Template:Documentation/end box</text><sha1>sfe0ppdpxp1nwfzhpym4jwdtmgpph1p</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/start box</title><ns>10</ns><id>93326</id><revision><id>742132</id><parentid>742131</parentid><timestamp>2013-07-20T14:04:29Z</timestamp><contributor><ip>81.129.86.23</ip></contributor><text xml:space="preserve" bytes="2002">

{{#ifeq: ¬ |

|

|
{{#switch: ¬
 | ¬ =   
   {{#switch: Template 
   | Template = File:Template-info.png Template documentation
   | Template:Ns:Module = File:Template-info.png Module documentation
   | File = Summary
   | #default = Documentation
   }}
 | #default = 
   
 }}{{
 #if: 
 | 
 | 
   {{
   #if: yes
   | [view] [edit] [history] [[[:Template:Purge]]] 
   | 
     [#if:  _        | %7B%7B%7Bpreload%7D%7D%7D_        | {{#ifeq: Template | File_          | Template:Documentation/preload-filespace_          | Template:Documentation/preload_          }} }} create]
   }}
}}

}}</text><sha1>linb792zr3zrp72qrhjkmqg1mz6uevr</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/start box2</title><ns>10</ns><id>93327</id><revision><id>631642</id><parentid>585737</parentid><timestamp>2013-01-20T15:55:27Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><minor/><comment>4 revisions from w:en:Template:Documentation/start box2: Requested by average_drifter in #mediawiki</comment><text xml:space="preserve" bytes="625">Template:Documentation/start box</text><sha1>t5j6y918odlsx0iuls0qgi6wbl050q3</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/template page</title><ns>10</ns><id>93328</id><revision><id>631644</id><parentid>557289</parentid><timestamp>2013-01-20T15:55:27Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><minor/><comment>1 revision from w:en:Template:Documentation/template page: Requested by average_drifter in #mediawiki</comment><text xml:space="preserve" bytes="232">{{#switch: Mbox | sandbox | testcases = Mbox | #default = Mbox }}</text><sha1>fenc3r6oe2sito28b1d8xgyo9gpq5uf</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation subpage</title><ns>10</ns><id>20806</id><revision><id>757428</id><parentid>715052</parentid><timestamp>2013-08-05T14:14:46Z</timestamp><contributor><username>IAlex</username><id>17961</id></contributor><minor/><comment>Reverted edits by 90.219.4.40 (talk) to last revision by Shirayuki</comment><text xml:space="preserve" bytes="2616">{{#if: |

File:Edit-paste.svg This is the template documentation page for Template:Mbox.
This page may not be intended to be viewed directly.
Links using variables may appear broken; do not replace these with hardcoded page names or URLs.
{{#if:x||

}} |{{#ifeq: mbox | doc

 | 

{{

   #ifeq: show | show
   | Template loop detected: Template:Mbox
   }}{{
   #if: 
   | 
   | {{#ifeq:Template|Template|}}
 }}

| }}

}}</text><sha1>7a3si8r4k2z0aqxpbbxz1c0gmny5pb9</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Fmbox</title><ns>10</ns><id>37655</id><revision><id>558796</id><parentid>558707</parentid><timestamp>2012-07-05T06:11:26Z</timestamp><contributor><username>Krinkle</username><id>135822</id></contributor><comment>update from enwiki</comment><text xml:space="preserve" bytes="1344"> {{#ifeq:File:Unbalanced scales.svg|none | | }}

{{#if:

|

}}

{{#switch:warning

| | warning | editnotice | system =

| #default =
This message box is using an invalid "type=warning" parameter and needs fixing.
[[Category:Wikipedia message box parameter needs fixing|Template:Main otherTemplate:Mbox]]

}}</text><sha1>mrldgfpkjyqf89ukmq2vy7gh3ir2j7i</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Mbox/doc</title><ns>10</ns><id>45374</id><revision><id>659649</id><parentid>651771</parentid><timestamp>2013-03-14T09:07:42Z</timestamp><contributor><username>Krinkle</username><id>135822</id></contributor><text xml:space="preserve" bytes="14176">Template:Documentation subpage This is the Template:Tl or message box meta-template.

It is used to build message box templates such as Template:Tl. It offers several different colours, uses default images if no image parameter is given and it has some other features.

This meta-template uses the mbox CSS classes in MediaWiki:Common.css. The classes can also be used directly in a wikitable if special functionality is needed. See the how-to guide for that.

Usage

Simple usage example:

{{mbox | text = Some text.}}

Template loop detected: Template:Mbox Complex example:

{{mbox
| type       = style
| small      = left
| image      = [[File:Emblem-question-yellow.svg|40px|alt=Question mark]]
| smallimage = [[File:Emblem-question-yellow.svg|20px|alt=Question mark]]
| textstyle  = color: red; font-weight: bold; font-style: italic;
| text       = Text for a big box, for the top of articles.
| smalltext  = Text for the top of article sections.
}}

Template loop detected: Template:Mbox

But you are not really supposed to use red bold italic text.

Message box types

The following examples use different type parameters but use no image parameters thus they use the default images for each type.

Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox

Other images

The default images shown above are mostly for convenience. In many cases it is more appropriate to use more specific images. These examples use the image parameter to specify an image other than the default images.

Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox

More examples

Some other parameter combinations.

Template loop detected: Template:Mbox Template loop detected: Template:Mbox

Template loop detected: Template:Mbox

Template loop detected: Template:Mbox

Parameters

List of all parameters:

{{mbox
| type  = critical / serious / warning / notice / / move / protection
| image = none / [[File:...|40px|...]]
| imagewidth = width of image section / default is 52px
| imageright = [[File:...|40px|...]]
| imagerightwidth = width of right image section / default is 52px
| style = CSS values
| textstyle = CSS values
| text  = The message body text.
| small = {{{small|}}} / left
| smallimage = none / [[File:...|20px|...]]
| smallimageright = none / [[File:...|20px|...]]
| smalltext  = A shorter message body text.
}}

type

If no type parameter is given the template has a 'blank' style.

image

No parameter = If no image parameter is given the template uses a default image. Which default image it uses depends on the type parameter.
An image = Should be an image with usual wiki notation. Widths of 40px - 50px are usually about right. (Images over 52 pixels wide will cause padding problems, unless you also set imagewidth.)
Often an icon is purely decorative in the W3C sense that it repeats the text. To improve accessibility, it is desirable to not have it be announced by screen readers, as well as to avoid it linking to an irrelevant page. If (and only if) the image license allows this, it can be marked with "Template:ParaTemplate:Para". For example:
image = [[File:Unbalanced scales.svg|40px|link=|alt=]]
Conversely, an icon that does not use "Template:ParaTemplate:Para", and which therefore is announced to visually impaired readers, should use an "Template:Para" parameter that describes the icon. With no Template:Para parameter (using the default link), the alt text should describe the icon's visual appearance. For example:
image = [[File:Gnome globe current event.svg|40px|alt=Clock over a larger globe]]
With a nonempty "Template:Para" the alt text should describe the icon's function. For example:
image = [[File:Purple question mark.svg|40px|link=Special:Random|alt=Random article]]
An icon whose license requires attribution may have alt text, but must keep the default link. Although public domain images do not require a link, many licenses do require one. Please see Purely decorative images for more information about licensing.
none = Means that no image is used.
blank = This parameter is now deprecated. If you see it in use, change it to "image=none".

imagewidth

Optional CSS value used to set width of image's div section. Allowing you to use images wider than the default 52px wide.
Example
imagewidth=100px

imageright

No parameter = If no imageright parameter is given then no image is shown on the right side.
An image = Should be an image with usual wiki notation. 40px - 50px width are usually about right depending on the image height to width ratio. (Images over 52 pixels width will cause padding problems, unless you also set imagerightwidth.) For example:
imageright = [[File:Nuvola apps bookcase.png|40px|alt=Three stacked books]]
Anything = Any other object that you want to show on the right side.

imagerightwidth

Optional CSS value used to set width of image's div section. Allowing you to use images wider than the default 52px wide.
Example
imagerightwidth=100px

style

Optional CSS values used by the entire message box table. Without quotation marks " " but with the ending semicolons ;. For example:
style = margin-bottom: 0.5em;

textstyle

Optional CSS values used by the text cell. For example:
textstyle = text-align: center;

text

The message body text.

The small parameters

The small article message boxes are meant for the top of sections. Normally they should only contain one or two lines of text.

small

left = Makes it a smaller left aligned message box. This also makes the default images smaller. Note that any data fed to the smallimage, smallimageright and smalltext parameters is only used if "small=left". To make it so your template also understands the small parameter you can use this code:
small = {{{small|}}}

Template loop detected: Template:Mbox Template loop detected: Template:Mbox

smallimage

No parameter = If no smallimage parameter is given then this template falls back to use the image parameter. If the image parameter also is empty then a small default image is used.
An image = Should be an image with usual wiki notation. 20px width is usually about right for boxes with one line of text, while 25px width is usually about right for boxes with two lines of text. For example:
smallimage = [[File:Gnome globe current event.svg|20px|alt=Clock over a larger globe]]
none = Means that no image is used. This overrides any image fed to image, when "small=left".

Template loop detected: Template:Mbox

smallimageright

No parameter = If no smallimageright parameter is given then this template falls back to use the imageright parameter. If the imageright parameter also is empty then no image is shown on the right side.
An image = Should be an image with usual wiki notation. 20px - 25px width is usually about right. For example:
smallimageright = [[File:Nuvola apps bookcase.png|20px|alt=Three stacked books]]
Anything = Any other object that you want to show on the right side.
none = Means that no right side image is used. This overrides any image fed to imageright, when "small=left".

Template loop detected: Template:Mbox

smalltext

A shorter version of the message body text. If no smalltext parameter is given then this template falls back to use the text parameter.

Technical details

If you need to use special characters in the text parameter then you need to escape them like this:

{{mbox
| text  = <div>
Equal sign = and a start and end brace { } work fine as they are.
But here is a pipe &#124; and two end braces <nowiki>}}</nowiki>.
And now a pipe and end braces <nowiki>|}}</nowiki>.
</div>
}}

Template loop detected: Template:Mbox

The <div> tags that surround the text in the example above are usually not needed. But if the text contains line breaks then sometimes we get weird line spacing. This especially happens when using vertical dotted lists. Then use the div tags to fix that.

This template uses CSS classes in MediaWiki:Common.css for most of its looks, thus it is fully skinnable.

This template calls Template:Tl which holds most of the code for Template:Tl, while Template:Tl itself does parameter preprocessing.

Internally this meta-template uses HTML wikimarkup instead of wikimarkup for the table code. That is the usual way we make meta-templates since wikimarkup has several drawbacks. For instance it makes it harder to use parser functions and some special characters in parameters.

The default images for this meta-template are in png format instead of svg format. The main reason is that some older web browsers have trouble with the transparent background that MediaWiki renders for svg images. The png images here have hand optimised transparent background colour so they look good in all browsers. Note that svg icons only look somewhat bad in the old browsers, thus such hand optimisation is only worth the trouble for very widely used icons.

For more technical details see the talk page and the "See also" links below.

See also

Template:Mbox templates Other pages:

</text><sha1>5cafb545bbublgg4mei08dvwxs9zay9</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Mbox templates</title><ns>10</ns><id>95150</id><revision><id>692773</id><parentid>565939</parentid><timestamp>2013-05-21T16:37:34Z</timestamp><contributor><ip>90.209.78.127</ip></contributor><text xml:space="preserve" bytes="268">Template:Nmbox</text><sha1>mm2hquqpmw1k85xftye00jkid2a0l4u</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Namespace detect</title><ns>10</ns><id>79689</id><revision><id>695915</id><parentid>497627</parentid><timestamp>2013-05-27T09:23:36Z</timestamp><contributor><ip>81.129.84.113</ip></contributor><text xml:space="preserve" bytes="1470">{{#switch:

 {{#if: 
   | {{{demospace}}}
   | {{#if: 
     | 
       {{#ifeq:|
       | talk
       |  
       }}
     | 
       {{#ifeq:template|template talk
       | talk
       | template 
       }}
     }}
   }}

| main | = | talk = | user = | project = | file | image = File:Unbalanced scales.svg | mediawiki = | template = | help = | category = | book = | extension = | other | #default =

}}</text><sha1>qry2n28n1p12gxaxgu7gs1bkzywbpqv</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Nmbox</title><ns>10</ns><id>47495</id><revision><id>556782</id><parentid>328128</parentid><timestamp>2012-06-29T10:35:15Z</timestamp><contributor><username>Krinkle</username><id>135822</id></contributor><text xml:space="preserve" bytes="587"> {{#if:File:Unbalanced scales.svg | |

}}

File:Unbalanced scales.svg type = content
image = [[File:Unbalanced scales.svg|40px|link=|alt=]]
This image is often used for Template:Tl and similar issues.
</text><sha1>6k7jc6wiy6i7qy82dd4dw1xja6e8k5w</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Ombox</title><ns>10</ns><id>93344</id><revision><id>634878</id><parentid>634793</parentid><timestamp>2013-01-25T22:39:30Z</timestamp><contributor><username>Kaldari</username><id>31661</id></contributor><comment>reverting breakage</comment><text xml:space="preserve" bytes="723">{{#ifeq:|yes

| Template:Ombox/core | Template:Ombox/core

}}</text><sha1>p9vh00dqvq0u1q3950ueg6abd93dyrt</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Ombox/core</title><ns>10</ns><id>93345</id><revision><id>680423</id><parentid>680422</parentid><timestamp>2013-04-29T09:31:02Z</timestamp><contributor><username>Siebrand</username><id>5665</id></contributor><minor/><comment>Protected "Template:Ombox/core": Highly visible template ([Edit=Allow only autoconfirmed users] (indefinite) [Move=Allow only autoconfirmed users] (indefinite))</comment><text xml:space="preserve" bytes="2250"> {{#ifeq:File:Unbalanced scales.svg|none | | }}

{{#if: | {{#ifeq:|none

 | 
|
 }}

}}

{{#switch:warning

| | critical | important | warning | caution | license | speedy | delete | content | style | move | protection | notice =

| #default =
This message box is using an invalid "type=warning" parameter and needs fixing.
[[Category:Wikipedia message box parameter needs fixing|Template:Main otherTemplate:Mbox]]

}}</text><sha1>l3n9mp2c6ch14gekpe1oxxe8thp3xdb</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Para</title><ns>10</ns><id>40658</id><revision><id>557339</id><parentid>557338</parentid><timestamp>2012-06-30T23:27:18Z</timestamp><contributor><username>Reedy</username><id>28424</id></contributor><minor/><comment>1 revision from w:en:Template:Para</comment><text xml:space="preserve" bytes="238">|{{#if:|{{{1}}}=|}}</text><sha1>3ve3qhqjaafu9wuy6em7y1fz49qyqfx</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Purge</title><ns>10</ns><id>31341</id><revision><id>405355</id><parentid>405354</parentid><timestamp>2011-05-24T01:39:17Z</timestamp><contributor><username>Peachey88</username><id>31302</id></contributor><minor/><comment>1 revision from w:en:Template:Purge: update to en.wiki</comment><text xml:space="preserve" bytes="197">Purge</text><sha1>830osaj62tvmlh6zq374ixtzbukxcih</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Tl</title><ns>10</ns><id>12644</id><redirect title="Template:Tlx"/><revision><id>760820</id><parentid>760712</parentid><timestamp>2013-08-10T10:29:27Z</timestamp><contributor><username>IAlex</username><id>17961</id></contributor><minor/><comment>Reverted edits by 175.200.179.56 (talk) to last revision by Varnent</comment><text xml:space="preserve" bytes="25">#REDIRECTTemplate:Tlx</text><sha1>avv0qklcaxr8n5r45lcc2x17y9w78sc</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Tlx</title><ns>10</ns><id>20809</id><revision><id>557363</id><parentid>534113</parentid><timestamp>2012-06-30T23:27:22Z</timestamp><contributor><username>Reedy</username><id>28424</id></contributor><minor/><comment>1 revision from w:en:Template:Tlx</comment><text xml:space="preserve" bytes="385">{{[[Template:|]]{{#if:| |{{{2}}} }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}}</text><sha1>0d6b5bkc7j2tegvw2yzm4b6iil98xqg</sha1> <mediawiki xsi:schemaLocation="http://www.mediawiki.org/xml/export-0.8/ http://www.mediawiki.org/xml/export-0.8.xsd" version="0.8" xml:lang="en"><siteinfo><sitename>MediaWiki</sitename><base>http://www.mediawiki.org/wiki/MediaWiki</base><generator>MediaWiki 1.22wmf12</generator><case>first-letter</case><namespaces><namespace key="-2" case="first-letter">Media</namespace><namespace key="-1" case="first-letter">Special</namespace><namespace key="0" case="first-letter"/><namespace key="1" case="first-letter">Talk</namespace><namespace key="2" case="first-letter">User</namespace><namespace key="3" case="first-letter">User talk</namespace><namespace key="4" case="first-letter">Project</namespace><namespace key="5" case="first-letter">Project talk</namespace><namespace key="6" case="first-letter">File</namespace><namespace key="7" case="first-letter">File talk</namespace><namespace key="8" case="first-letter">MediaWiki</namespace><namespace key="9" case="first-letter">MediaWiki talk</namespace><namespace key="10" case="first-letter">Template</namespace><namespace key="11" case="first-letter">Template talk</namespace><namespace key="12" case="first-letter">Help</namespace><namespace key="13" case="first-letter">Help talk</namespace><namespace key="14" case="first-letter">Category</namespace><namespace key="15" case="first-letter">Category talk</namespace><namespace key="90" case="first-letter">Thread</namespace><namespace key="91" case="first-letter">Thread talk</namespace><namespace key="92" case="first-letter">Summary</namespace><namespace key="93" case="first-letter">Summary talk</namespace><namespace key="100" case="first-letter">Manual</namespace><namespace key="101" case="first-letter">Manual talk</namespace><namespace key="102" case="first-letter">Extension</namespace><namespace key="103" case="first-letter">Extension talk</namespace><namespace key="104" case="first-letter">API</namespace><namespace key="105" case="first-letter">API talk</namespace><namespace key="106" case="first-letter">Skin</namespace><namespace key="107" case="first-letter">Skin talk</namespace><namespace key="828" case="first-letter">Module</namespace><namespace key="829" case="first-letter">Module talk</namespace><namespace key="1198" case="first-letter">Translations</namespace><namespace key="1199" case="first-letter">Translations talk</namespace><namespace key="2500" case="first-letter">VisualEditor</namespace><namespace key="2501" case="first-letter">VisualEditor talk</namespace></namespaces></siteinfo><page><title>Template:Mbox</title><ns>10</ns><id>45372</id><revision><id>634882</id><parentid>634876</parentid><timestamp>2013-01-25T22:40:38Z</timestamp><contributor><username>Kaldari</username><id>31661</id></contributor><comment>reverting self, problem was in ombox template</comment><text xml:space="preserve" bytes="707">{{

 Template:Namespace detect

| type = notice | image = File:Wikitext.svg | imageright = | class = | style = | textstyle = | text = type = style
image = [[File:Wikitext.svg|50px|link=|alt=]]
This image is often used for Template:Tl etc. | small = | smallimage = | smallimageright = | smalltext = | subst = | date = | name = }}</text><sha1>40w6e1mdq2t695t9dv143e1rzq5pv1o</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation</title><ns>10</ns><id>20803</id><revision><id>688512</id><parentid>687083</parentid><timestamp>2013-05-11T17:18:34Z</timestamp><contributor><username>Wargo</username><id>25061</id></contributor><text xml:space="preserve" bytes="2079">{{#ifeq: Mbox | sandbox

|
Template:Template sandbox notice

}}Template:Documentation/start box2 {{#switch: {{#if:|1|0}}{{#if:|1|0}}{{#ifexist:|1|0}}{{#ifexist:Template:Documentation/docspace:Template:Documentation/template page/doc|1|0}} | 1000 | 1001 | 1010 | 1011 | 1100 | 1101 | 1110 | 1111 = | 0110 | 0111 = {{ {{{1}}} }} | 0001 | 0011 = {{ Template:Documentation/docspace:Template:Documentation/template page/doc }} | 0000 | 0100 | 0010 | 0101 = }} Template:Documentation/end box2</text><sha1>bvikrz5412m4gizkphh8ftj604e3kbf</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/docspace</title><ns>10</ns><id>93323</id><revision><id>631615</id><parentid>557279</parentid><timestamp>2013-01-20T15:55:26Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><minor/><comment>1 revision from w:en:Template:Documentation/docspace: Requested by average_drifter in #mediawiki</comment><text xml:space="preserve" bytes="302">{{#switch: Template

 | 
 | File
 | MediaWiki
 | Category = Template talk
 | #default = Template
}}</text><sha1>7f8iymss9sr4v7f4t5pza1arwjogrv3</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/end box</title><ns>10</ns><id>93324</id><revision><id>631856</id><parentid>631623</parentid><timestamp>2013-01-20T16:24:41Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><text xml:space="preserve" bytes="4124">

{{#if:

 {{#ifeq:  | off
 |
 | yes{{
   #switch: Template
   | User
   | Template = yes
   }}
 }}

| Template:Fmbox }}{{#if:

 {{#switch: Mbox
 | doc
 | testcases = strange
 }}

| [[Category:Wikipedia pages with strange ((documentation)) usage|Template:Main otherTemplate:Mbox]]

}}</text><sha1>r3qht4u0hwps2mqnst3puyi8anb9dmz</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/end box2</title><ns>10</ns><id>124329</id><revision><id>688362</id><parentid>688359</parentid><timestamp>2013-05-11T09:36:55Z</timestamp><contributor><username>Shirayuki</username><id>472859</id></contributor><comment>Undo revision 688359 by Shirayuki (talk)</comment><text xml:space="preserve" bytes="864">Template:Documentation/end box</text><sha1>sfe0ppdpxp1nwfzhpym4jwdtmgpph1p</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/start box</title><ns>10</ns><id>93326</id><revision><id>742132</id><parentid>742131</parentid><timestamp>2013-07-20T14:04:29Z</timestamp><contributor><ip>81.129.86.23</ip></contributor><text xml:space="preserve" bytes="2002">

{{#ifeq: ¬ |

|

|
{{#switch: ¬
 | ¬ =   
   {{#switch: Template 
   | Template = File:Template-info.png Template documentation
   | Template:Ns:Module = File:Template-info.png Module documentation
   | File = Summary
   | #default = Documentation
   }}
 | #default = 
   
 }}{{
 #if: 
 | 
 | 
   {{
   #if: yes
   | [view] [edit] [history] [[[:Template:Purge]]] 
   | 
     [#if:  _        | %7B%7B%7Bpreload%7D%7D%7D_        | {{#ifeq: Template | File_          | Template:Documentation/preload-filespace_          | Template:Documentation/preload_          }} }} create]
   }}
}}

}}</text><sha1>linb792zr3zrp72qrhjkmqg1mz6uevr</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/start box2</title><ns>10</ns><id>93327</id><revision><id>631642</id><parentid>585737</parentid><timestamp>2013-01-20T15:55:27Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><minor/><comment>4 revisions from w:en:Template:Documentation/start box2: Requested by average_drifter in #mediawiki</comment><text xml:space="preserve" bytes="625">Template:Documentation/start box</text><sha1>t5j6y918odlsx0iuls0qgi6wbl050q3</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/template page</title><ns>10</ns><id>93328</id><revision><id>631644</id><parentid>557289</parentid><timestamp>2013-01-20T15:55:27Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><minor/><comment>1 revision from w:en:Template:Documentation/template page: Requested by average_drifter in #mediawiki</comment><text xml:space="preserve" bytes="232">{{#switch: Mbox | sandbox | testcases = Mbox | #default = Mbox }}</text><sha1>fenc3r6oe2sito28b1d8xgyo9gpq5uf</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation subpage</title><ns>10</ns><id>20806</id><revision><id>757428</id><parentid>715052</parentid><timestamp>2013-08-05T14:14:46Z</timestamp><contributor><username>IAlex</username><id>17961</id></contributor><minor/><comment>Reverted edits by 90.219.4.40 (talk) to last revision by Shirayuki</comment><text xml:space="preserve" bytes="2616">{{#if: |

File:Edit-paste.svg This is the template documentation page for Template:Mbox.
This page may not be intended to be viewed directly.
Links using variables may appear broken; do not replace these with hardcoded page names or URLs.
{{#if:x||

}} |{{#ifeq: mbox | doc

 | 

{{

   #ifeq: show | show
   | Template loop detected: Template:Mbox
   }}{{
   #if: 
   | 
   | {{#ifeq:Template|Template|}}
 }}

| }}

}}</text><sha1>7a3si8r4k2z0aqxpbbxz1c0gmny5pb9</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Fmbox</title><ns>10</ns><id>37655</id><revision><id>558796</id><parentid>558707</parentid><timestamp>2012-07-05T06:11:26Z</timestamp><contributor><username>Krinkle</username><id>135822</id></contributor><comment>update from enwiki</comment><text xml:space="preserve" bytes="1344"> {{#ifeq:File:Wikitext.svg|none | | }}

{{#if:

|

}}

{{#switch:notice

| | warning | editnotice | system =

| #default =
This message box is using an invalid "type=notice" parameter and needs fixing.
[[Category:Wikipedia message box parameter needs fixing|Template:Main otherTemplate:Mbox]]

}}</text><sha1>mrldgfpkjyqf89ukmq2vy7gh3ir2j7i</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Mbox/doc</title><ns>10</ns><id>45374</id><revision><id>659649</id><parentid>651771</parentid><timestamp>2013-03-14T09:07:42Z</timestamp><contributor><username>Krinkle</username><id>135822</id></contributor><text xml:space="preserve" bytes="14176">Template:Documentation subpage This is the Template:Tl or message box meta-template.

It is used to build message box templates such as Template:Tl. It offers several different colours, uses default images if no image parameter is given and it has some other features.

This meta-template uses the mbox CSS classes in MediaWiki:Common.css. The classes can also be used directly in a wikitable if special functionality is needed. See the how-to guide for that.

Usage

Simple usage example:

{{mbox | text = Some text.}}

Template loop detected: Template:Mbox Complex example:

{{mbox
| type       = style
| small      = left
| image      = [[File:Emblem-question-yellow.svg|40px|alt=Question mark]]
| smallimage = [[File:Emblem-question-yellow.svg|20px|alt=Question mark]]
| textstyle  = color: red; font-weight: bold; font-style: italic;
| text       = Text for a big box, for the top of articles.
| smalltext  = Text for the top of article sections.
}}

Template loop detected: Template:Mbox

But you are not really supposed to use red bold italic text.

Message box types

The following examples use different type parameters but use no image parameters thus they use the default images for each type.

Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox

Other images

The default images shown above are mostly for convenience. In many cases it is more appropriate to use more specific images. These examples use the image parameter to specify an image other than the default images.

Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox

More examples

Some other parameter combinations.

Template loop detected: Template:Mbox Template loop detected: Template:Mbox

Template loop detected: Template:Mbox

Template loop detected: Template:Mbox

Parameters

List of all parameters:

{{mbox
| type  = critical / serious / warning / notice / / move / protection
| image = none / [[File:...|40px|...]]
| imagewidth = width of image section / default is 52px
| imageright = [[File:...|40px|...]]
| imagerightwidth = width of right image section / default is 52px
| style = CSS values
| textstyle = CSS values
| text  = The message body text.
| small = {{{small|}}} / left
| smallimage = none / [[File:...|20px|...]]
| smallimageright = none / [[File:...|20px|...]]
| smalltext  = A shorter message body text.
}}

type

If no type parameter is given the template has a 'blank' style.

image

No parameter = If no image parameter is given the template uses a default image. Which default image it uses depends on the type parameter.
An image = Should be an image with usual wiki notation. Widths of 40px - 50px are usually about right. (Images over 52 pixels wide will cause padding problems, unless you also set imagewidth.)
Often an icon is purely decorative in the W3C sense that it repeats the text. To improve accessibility, it is desirable to not have it be announced by screen readers, as well as to avoid it linking to an irrelevant page. If (and only if) the image license allows this, it can be marked with "Template:ParaTemplate:Para". For example:
image = [[File:Unbalanced scales.svg|40px|link=|alt=]]
Conversely, an icon that does not use "Template:ParaTemplate:Para", and which therefore is announced to visually impaired readers, should use an "Template:Para" parameter that describes the icon. With no Template:Para parameter (using the default link), the alt text should describe the icon's visual appearance. For example:
image = [[File:Gnome globe current event.svg|40px|alt=Clock over a larger globe]]
With a nonempty "Template:Para" the alt text should describe the icon's function. For example:
image = [[File:Purple question mark.svg|40px|link=Special:Random|alt=Random article]]
An icon whose license requires attribution may have alt text, but must keep the default link. Although public domain images do not require a link, many licenses do require one. Please see Purely decorative images for more information about licensing.
none = Means that no image is used.
blank = This parameter is now deprecated. If you see it in use, change it to "image=none".

imagewidth

Optional CSS value used to set width of image's div section. Allowing you to use images wider than the default 52px wide.
Example
imagewidth=100px

imageright

No parameter = If no imageright parameter is given then no image is shown on the right side.
An image = Should be an image with usual wiki notation. 40px - 50px width are usually about right depending on the image height to width ratio. (Images over 52 pixels width will cause padding problems, unless you also set imagerightwidth.) For example:
imageright = [[File:Nuvola apps bookcase.png|40px|alt=Three stacked books]]
Anything = Any other object that you want to show on the right side.

imagerightwidth

Optional CSS value used to set width of image's div section. Allowing you to use images wider than the default 52px wide.
Example
imagerightwidth=100px

style

Optional CSS values used by the entire message box table. Without quotation marks " " but with the ending semicolons ;. For example:
style = margin-bottom: 0.5em;

textstyle

Optional CSS values used by the text cell. For example:
textstyle = text-align: center;

text

The message body text.

The small parameters

The small article message boxes are meant for the top of sections. Normally they should only contain one or two lines of text.

small

left = Makes it a smaller left aligned message box. This also makes the default images smaller. Note that any data fed to the smallimage, smallimageright and smalltext parameters is only used if "small=left". To make it so your template also understands the small parameter you can use this code:
small = {{{small|}}}

Template loop detected: Template:Mbox Template loop detected: Template:Mbox

smallimage

No parameter = If no smallimage parameter is given then this template falls back to use the image parameter. If the image parameter also is empty then a small default image is used.
An image = Should be an image with usual wiki notation. 20px width is usually about right for boxes with one line of text, while 25px width is usually about right for boxes with two lines of text. For example:
smallimage = [[File:Gnome globe current event.svg|20px|alt=Clock over a larger globe]]
none = Means that no image is used. This overrides any image fed to image, when "small=left".

Template loop detected: Template:Mbox

smallimageright

No parameter = If no smallimageright parameter is given then this template falls back to use the imageright parameter. If the imageright parameter also is empty then no image is shown on the right side.
An image = Should be an image with usual wiki notation. 20px - 25px width is usually about right. For example:
smallimageright = [[File:Nuvola apps bookcase.png|20px|alt=Three stacked books]]
Anything = Any other object that you want to show on the right side.
none = Means that no right side image is used. This overrides any image fed to imageright, when "small=left".

Template loop detected: Template:Mbox

smalltext

A shorter version of the message body text. If no smalltext parameter is given then this template falls back to use the text parameter.

Technical details

If you need to use special characters in the text parameter then you need to escape them like this:

{{mbox
| text  = <div>
Equal sign = and a start and end brace { } work fine as they are.
But here is a pipe &#124; and two end braces <nowiki>}}</nowiki>.
And now a pipe and end braces <nowiki>|}}</nowiki>.
</div>
}}

Template loop detected: Template:Mbox

The <div> tags that surround the text in the example above are usually not needed. But if the text contains line breaks then sometimes we get weird line spacing. This especially happens when using vertical dotted lists. Then use the div tags to fix that.

This template uses CSS classes in MediaWiki:Common.css for most of its looks, thus it is fully skinnable.

This template calls Template:Tl which holds most of the code for Template:Tl, while Template:Tl itself does parameter preprocessing.

Internally this meta-template uses HTML wikimarkup instead of wikimarkup for the table code. That is the usual way we make meta-templates since wikimarkup has several drawbacks. For instance it makes it harder to use parser functions and some special characters in parameters.

The default images for this meta-template are in png format instead of svg format. The main reason is that some older web browsers have trouble with the transparent background that MediaWiki renders for svg images. The png images here have hand optimised transparent background colour so they look good in all browsers. Note that svg icons only look somewhat bad in the old browsers, thus such hand optimisation is only worth the trouble for very widely used icons.

For more technical details see the talk page and the "See also" links below.

See also

Template:Mbox templates Other pages:

</text><sha1>5cafb545bbublgg4mei08dvwxs9zay9</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Mbox templates</title><ns>10</ns><id>95150</id><revision><id>692773</id><parentid>565939</parentid><timestamp>2013-05-21T16:37:34Z</timestamp><contributor><ip>90.209.78.127</ip></contributor><text xml:space="preserve" bytes="268">Template:Nmbox</text><sha1>mm2hquqpmw1k85xftye00jkid2a0l4u</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Namespace detect</title><ns>10</ns><id>79689</id><revision><id>695915</id><parentid>497627</parentid><timestamp>2013-05-27T09:23:36Z</timestamp><contributor><ip>81.129.84.113</ip></contributor><text xml:space="preserve" bytes="1470">{{#switch:

 {{#if: 
   | {{{demospace}}}
   | {{#if: 
     | 
       {{#ifeq:|
       | talk
       |  
       }}
     | 
       {{#ifeq:template|template talk
       | talk
       | template 
       }}
     }}
   }}

| main | = | talk = | user = | project = | file | image = File:Wikitext.svg | mediawiki = | template = | help = | category = | book = | extension = | other | #default =

}}</text><sha1>qry2n28n1p12gxaxgu7gs1bkzywbpqv</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Nmbox</title><ns>10</ns><id>47495</id><revision><id>556782</id><parentid>328128</parentid><timestamp>2012-06-29T10:35:15Z</timestamp><contributor><username>Krinkle</username><id>135822</id></contributor><text xml:space="preserve" bytes="587"> {{#if:File:Wikitext.svg | |

}}

File:Wikitext.svg type = style
image = [[File:Wikitext.svg|50px|link=|alt=]]
This image is often used for Template:Tl etc.
</text><sha1>6k7jc6wiy6i7qy82dd4dw1xja6e8k5w</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Ombox</title><ns>10</ns><id>93344</id><revision><id>634878</id><parentid>634793</parentid><timestamp>2013-01-25T22:39:30Z</timestamp><contributor><username>Kaldari</username><id>31661</id></contributor><comment>reverting breakage</comment><text xml:space="preserve" bytes="723">{{#ifeq:|yes

| Template:Ombox/core | Template:Ombox/core

}}</text><sha1>p9vh00dqvq0u1q3950ueg6abd93dyrt</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Ombox/core</title><ns>10</ns><id>93345</id><revision><id>680423</id><parentid>680422</parentid><timestamp>2013-04-29T09:31:02Z</timestamp><contributor><username>Siebrand</username><id>5665</id></contributor><minor/><comment>Protected "Template:Ombox/core": Highly visible template ([Edit=Allow only autoconfirmed users] (indefinite) [Move=Allow only autoconfirmed users] (indefinite))</comment><text xml:space="preserve" bytes="2250"> {{#ifeq:File:Wikitext.svg|none | | }}

{{#if: | {{#ifeq:|none

 | 
|
 }}

}}

{{#switch:notice

| | critical | important | warning | caution | license | speedy | delete | content | style | move | protection | notice =

| #default =
This message box is using an invalid "type=notice" parameter and needs fixing.
[[Category:Wikipedia message box parameter needs fixing|Template:Main otherTemplate:Mbox]]

}}</text><sha1>l3n9mp2c6ch14gekpe1oxxe8thp3xdb</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Para</title><ns>10</ns><id>40658</id><revision><id>557339</id><parentid>557338</parentid><timestamp>2012-06-30T23:27:18Z</timestamp><contributor><username>Reedy</username><id>28424</id></contributor><minor/><comment>1 revision from w:en:Template:Para</comment><text xml:space="preserve" bytes="238">|{{#if:|{{{1}}}=|}}</text><sha1>3ve3qhqjaafu9wuy6em7y1fz49qyqfx</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Purge</title><ns>10</ns><id>31341</id><revision><id>405355</id><parentid>405354</parentid><timestamp>2011-05-24T01:39:17Z</timestamp><contributor><username>Peachey88</username><id>31302</id></contributor><minor/><comment>1 revision from w:en:Template:Purge: update to en.wiki</comment><text xml:space="preserve" bytes="197">Purge</text><sha1>830osaj62tvmlh6zq374ixtzbukxcih</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Tl</title><ns>10</ns><id>12644</id><redirect title="Template:Tlx"/><revision><id>760820</id><parentid>760712</parentid><timestamp>2013-08-10T10:29:27Z</timestamp><contributor><username>IAlex</username><id>17961</id></contributor><minor/><comment>Reverted edits by 175.200.179.56 (talk) to last revision by Varnent</comment><text xml:space="preserve" bytes="25">#REDIRECTTemplate:Tlx</text><sha1>avv0qklcaxr8n5r45lcc2x17y9w78sc</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Tlx</title><ns>10</ns><id>20809</id><revision><id>557363</id><parentid>534113</parentid><timestamp>2012-06-30T23:27:22Z</timestamp><contributor><username>Reedy</username><id>28424</id></contributor><minor/><comment>1 revision from w:en:Template:Tlx</comment><text xml:space="preserve" bytes="385">{{[[Template:|]]{{#if:| |{{{2}}} }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}}</text><sha1>0d6b5bkc7j2tegvw2yzm4b6iil98xqg</sha1> <mediawiki xsi:schemaLocation="http://www.mediawiki.org/xml/export-0.8/ http://www.mediawiki.org/xml/export-0.8.xsd" version="0.8" xml:lang="en"><siteinfo><sitename>MediaWiki</sitename><base>http://www.mediawiki.org/wiki/MediaWiki</base><generator>MediaWiki 1.22wmf12</generator><case>first-letter</case><namespaces><namespace key="-2" case="first-letter">Media</namespace><namespace key="-1" case="first-letter">Special</namespace><namespace key="0" case="first-letter"/><namespace key="1" case="first-letter">Talk</namespace><namespace key="2" case="first-letter">User</namespace><namespace key="3" case="first-letter">User talk</namespace><namespace key="4" case="first-letter">Project</namespace><namespace key="5" case="first-letter">Project talk</namespace><namespace key="6" case="first-letter">File</namespace><namespace key="7" case="first-letter">File talk</namespace><namespace key="8" case="first-letter">MediaWiki</namespace><namespace key="9" case="first-letter">MediaWiki talk</namespace><namespace key="10" case="first-letter">Template</namespace><namespace key="11" case="first-letter">Template talk</namespace><namespace key="12" case="first-letter">Help</namespace><namespace key="13" case="first-letter">Help talk</namespace><namespace key="14" case="first-letter">Category</namespace><namespace key="15" case="first-letter">Category talk</namespace><namespace key="90" case="first-letter">Thread</namespace><namespace key="91" case="first-letter">Thread talk</namespace><namespace key="92" case="first-letter">Summary</namespace><namespace key="93" case="first-letter">Summary talk</namespace><namespace key="100" case="first-letter">Manual</namespace><namespace key="101" case="first-letter">Manual talk</namespace><namespace key="102" case="first-letter">Extension</namespace><namespace key="103" case="first-letter">Extension talk</namespace><namespace key="104" case="first-letter">API</namespace><namespace key="105" case="first-letter">API talk</namespace><namespace key="106" case="first-letter">Skin</namespace><namespace key="107" case="first-letter">Skin talk</namespace><namespace key="828" case="first-letter">Module</namespace><namespace key="829" case="first-letter">Module talk</namespace><namespace key="1198" case="first-letter">Translations</namespace><namespace key="1199" case="first-letter">Translations talk</namespace><namespace key="2500" case="first-letter">VisualEditor</namespace><namespace key="2501" case="first-letter">VisualEditor talk</namespace></namespaces></siteinfo><page><title>Template:Mbox</title><ns>10</ns><id>45372</id><revision><id>634882</id><parentid>634876</parentid><timestamp>2013-01-25T22:40:38Z</timestamp><contributor><username>Kaldari</username><id>31661</id></contributor><comment>reverting self, problem was in ombox template</comment><text xml:space="preserve" bytes="707">{{

 Template:Namespace detect

| type = move | image = File:Merge-arrows.svg | imageright = | class = | style = | textstyle = | text = type = move
image = [[File:Merge-arrows.svg|50px|link=|alt=]]
This image is used for Template:Tl etc. | small = | smallimage = | smallimageright = | smalltext = | subst = | date = | name = }}</text><sha1>40w6e1mdq2t695t9dv143e1rzq5pv1o</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation</title><ns>10</ns><id>20803</id><revision><id>688512</id><parentid>687083</parentid><timestamp>2013-05-11T17:18:34Z</timestamp><contributor><username>Wargo</username><id>25061</id></contributor><text xml:space="preserve" bytes="2079">{{#ifeq: Mbox | sandbox

|
Template:Template sandbox notice

}}Template:Documentation/start box2 {{#switch: {{#if:|1|0}}{{#if:|1|0}}{{#ifexist:|1|0}}{{#ifexist:Template:Documentation/docspace:Template:Documentation/template page/doc|1|0}} | 1000 | 1001 | 1010 | 1011 | 1100 | 1101 | 1110 | 1111 = | 0110 | 0111 = {{ {{{1}}} }} | 0001 | 0011 = {{ Template:Documentation/docspace:Template:Documentation/template page/doc }} | 0000 | 0100 | 0010 | 0101 = }} Template:Documentation/end box2</text><sha1>bvikrz5412m4gizkphh8ftj604e3kbf</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/docspace</title><ns>10</ns><id>93323</id><revision><id>631615</id><parentid>557279</parentid><timestamp>2013-01-20T15:55:26Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><minor/><comment>1 revision from w:en:Template:Documentation/docspace: Requested by average_drifter in #mediawiki</comment><text xml:space="preserve" bytes="302">{{#switch: Template

 | 
 | File
 | MediaWiki
 | Category = Template talk
 | #default = Template
}}</text><sha1>7f8iymss9sr4v7f4t5pza1arwjogrv3</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/end box</title><ns>10</ns><id>93324</id><revision><id>631856</id><parentid>631623</parentid><timestamp>2013-01-20T16:24:41Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><text xml:space="preserve" bytes="4124">

{{#if:

 {{#ifeq:  | off
 |
 | yes{{
   #switch: Template
   | User
   | Template = yes
   }}
 }}

| Template:Fmbox }}{{#if:

 {{#switch: Mbox
 | doc
 | testcases = strange
 }}

| [[Category:Wikipedia pages with strange ((documentation)) usage|Template:Main otherTemplate:Mbox]]

}}</text><sha1>r3qht4u0hwps2mqnst3puyi8anb9dmz</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/end box2</title><ns>10</ns><id>124329</id><revision><id>688362</id><parentid>688359</parentid><timestamp>2013-05-11T09:36:55Z</timestamp><contributor><username>Shirayuki</username><id>472859</id></contributor><comment>Undo revision 688359 by Shirayuki (talk)</comment><text xml:space="preserve" bytes="864">Template:Documentation/end box</text><sha1>sfe0ppdpxp1nwfzhpym4jwdtmgpph1p</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/start box</title><ns>10</ns><id>93326</id><revision><id>742132</id><parentid>742131</parentid><timestamp>2013-07-20T14:04:29Z</timestamp><contributor><ip>81.129.86.23</ip></contributor><text xml:space="preserve" bytes="2002">

{{#ifeq: ¬ |

|

|
{{#switch: ¬
 | ¬ =   
   {{#switch: Template 
   | Template = File:Template-info.png Template documentation
   | Template:Ns:Module = File:Template-info.png Module documentation
   | File = Summary
   | #default = Documentation
   }}
 | #default = 
   
 }}{{
 #if: 
 | 
 | 
   {{
   #if: yes
   | [view] [edit] [history] [[[:Template:Purge]]] 
   | 
     [#if:  _        | %7B%7B%7Bpreload%7D%7D%7D_        | {{#ifeq: Template | File_          | Template:Documentation/preload-filespace_          | Template:Documentation/preload_          }} }} create]
   }}
}}

}}</text><sha1>linb792zr3zrp72qrhjkmqg1mz6uevr</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/start box2</title><ns>10</ns><id>93327</id><revision><id>631642</id><parentid>585737</parentid><timestamp>2013-01-20T15:55:27Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><minor/><comment>4 revisions from w:en:Template:Documentation/start box2: Requested by average_drifter in #mediawiki</comment><text xml:space="preserve" bytes="625">Template:Documentation/start box</text><sha1>t5j6y918odlsx0iuls0qgi6wbl050q3</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/template page</title><ns>10</ns><id>93328</id><revision><id>631644</id><parentid>557289</parentid><timestamp>2013-01-20T15:55:27Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><minor/><comment>1 revision from w:en:Template:Documentation/template page: Requested by average_drifter in #mediawiki</comment><text xml:space="preserve" bytes="232">{{#switch: Mbox | sandbox | testcases = Mbox | #default = Mbox }}</text><sha1>fenc3r6oe2sito28b1d8xgyo9gpq5uf</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation subpage</title><ns>10</ns><id>20806</id><revision><id>757428</id><parentid>715052</parentid><timestamp>2013-08-05T14:14:46Z</timestamp><contributor><username>IAlex</username><id>17961</id></contributor><minor/><comment>Reverted edits by 90.219.4.40 (talk) to last revision by Shirayuki</comment><text xml:space="preserve" bytes="2616">{{#if: |

File:Edit-paste.svg This is the template documentation page for Template:Mbox.
This page may not be intended to be viewed directly.
Links using variables may appear broken; do not replace these with hardcoded page names or URLs.
{{#if:x||

}} |{{#ifeq: mbox | doc

 | 

{{

   #ifeq: show | show
   | Template loop detected: Template:Mbox
   }}{{
   #if: 
   | 
   | {{#ifeq:Template|Template|}}
 }}

| }}

}}</text><sha1>7a3si8r4k2z0aqxpbbxz1c0gmny5pb9</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Fmbox</title><ns>10</ns><id>37655</id><revision><id>558796</id><parentid>558707</parentid><timestamp>2012-07-05T06:11:26Z</timestamp><contributor><username>Krinkle</username><id>135822</id></contributor><comment>update from enwiki</comment><text xml:space="preserve" bytes="1344"> {{#ifeq:File:Merge-arrows.svg|none | | }}

{{#if:

|

}}

{{#switch:move

| | warning | editnotice | system =

| #default =
This message box is using an invalid "type=move" parameter and needs fixing.
[[Category:Wikipedia message box parameter needs fixing|Template:Main otherTemplate:Mbox]]

}}</text><sha1>mrldgfpkjyqf89ukmq2vy7gh3ir2j7i</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Mbox/doc</title><ns>10</ns><id>45374</id><revision><id>659649</id><parentid>651771</parentid><timestamp>2013-03-14T09:07:42Z</timestamp><contributor><username>Krinkle</username><id>135822</id></contributor><text xml:space="preserve" bytes="14176">Template:Documentation subpage This is the Template:Tl or message box meta-template.

It is used to build message box templates such as Template:Tl. It offers several different colours, uses default images if no image parameter is given and it has some other features.

This meta-template uses the mbox CSS classes in MediaWiki:Common.css. The classes can also be used directly in a wikitable if special functionality is needed. See the how-to guide for that.

Usage

Simple usage example:

{{mbox | text = Some text.}}

Template loop detected: Template:Mbox Complex example:

{{mbox
| type       = style
| small      = left
| image      = [[File:Emblem-question-yellow.svg|40px|alt=Question mark]]
| smallimage = [[File:Emblem-question-yellow.svg|20px|alt=Question mark]]
| textstyle  = color: red; font-weight: bold; font-style: italic;
| text       = Text for a big box, for the top of articles.
| smalltext  = Text for the top of article sections.
}}

Template loop detected: Template:Mbox

But you are not really supposed to use red bold italic text.

Message box types

The following examples use different type parameters but use no image parameters thus they use the default images for each type.

Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox

Other images

The default images shown above are mostly for convenience. In many cases it is more appropriate to use more specific images. These examples use the image parameter to specify an image other than the default images.

Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox

More examples

Some other parameter combinations.

Template loop detected: Template:Mbox Template loop detected: Template:Mbox

Template loop detected: Template:Mbox

Template loop detected: Template:Mbox

Parameters

List of all parameters:

{{mbox
| type  = critical / serious / warning / notice / / move / protection
| image = none / [[File:...|40px|...]]
| imagewidth = width of image section / default is 52px
| imageright = [[File:...|40px|...]]
| imagerightwidth = width of right image section / default is 52px
| style = CSS values
| textstyle = CSS values
| text  = The message body text.
| small = {{{small|}}} / left
| smallimage = none / [[File:...|20px|...]]
| smallimageright = none / [[File:...|20px|...]]
| smalltext  = A shorter message body text.
}}

type

If no type parameter is given the template has a 'blank' style.

image

No parameter = If no image parameter is given the template uses a default image. Which default image it uses depends on the type parameter.
An image = Should be an image with usual wiki notation. Widths of 40px - 50px are usually about right. (Images over 52 pixels wide will cause padding problems, unless you also set imagewidth.)
Often an icon is purely decorative in the W3C sense that it repeats the text. To improve accessibility, it is desirable to not have it be announced by screen readers, as well as to avoid it linking to an irrelevant page. If (and only if) the image license allows this, it can be marked with "Template:ParaTemplate:Para". For example:
image = [[File:Unbalanced scales.svg|40px|link=|alt=]]
Conversely, an icon that does not use "Template:ParaTemplate:Para", and which therefore is announced to visually impaired readers, should use an "Template:Para" parameter that describes the icon. With no Template:Para parameter (using the default link), the alt text should describe the icon's visual appearance. For example:
image = [[File:Gnome globe current event.svg|40px|alt=Clock over a larger globe]]
With a nonempty "Template:Para" the alt text should describe the icon's function. For example:
image = [[File:Purple question mark.svg|40px|link=Special:Random|alt=Random article]]
An icon whose license requires attribution may have alt text, but must keep the default link. Although public domain images do not require a link, many licenses do require one. Please see Purely decorative images for more information about licensing.
none = Means that no image is used.
blank = This parameter is now deprecated. If you see it in use, change it to "image=none".

imagewidth

Optional CSS value used to set width of image's div section. Allowing you to use images wider than the default 52px wide.
Example
imagewidth=100px

imageright

No parameter = If no imageright parameter is given then no image is shown on the right side.
An image = Should be an image with usual wiki notation. 40px - 50px width are usually about right depending on the image height to width ratio. (Images over 52 pixels width will cause padding problems, unless you also set imagerightwidth.) For example:
imageright = [[File:Nuvola apps bookcase.png|40px|alt=Three stacked books]]
Anything = Any other object that you want to show on the right side.

imagerightwidth

Optional CSS value used to set width of image's div section. Allowing you to use images wider than the default 52px wide.
Example
imagerightwidth=100px

style

Optional CSS values used by the entire message box table. Without quotation marks " " but with the ending semicolons ;. For example:
style = margin-bottom: 0.5em;

textstyle

Optional CSS values used by the text cell. For example:
textstyle = text-align: center;

text

The message body text.

The small parameters

The small article message boxes are meant for the top of sections. Normally they should only contain one or two lines of text.

small

left = Makes it a smaller left aligned message box. This also makes the default images smaller. Note that any data fed to the smallimage, smallimageright and smalltext parameters is only used if "small=left". To make it so your template also understands the small parameter you can use this code:
small = {{{small|}}}

Template loop detected: Template:Mbox Template loop detected: Template:Mbox

smallimage

No parameter = If no smallimage parameter is given then this template falls back to use the image parameter. If the image parameter also is empty then a small default image is used.
An image = Should be an image with usual wiki notation. 20px width is usually about right for boxes with one line of text, while 25px width is usually about right for boxes with two lines of text. For example:
smallimage = [[File:Gnome globe current event.svg|20px|alt=Clock over a larger globe]]
none = Means that no image is used. This overrides any image fed to image, when "small=left".

Template loop detected: Template:Mbox

smallimageright

No parameter = If no smallimageright parameter is given then this template falls back to use the imageright parameter. If the imageright parameter also is empty then no image is shown on the right side.
An image = Should be an image with usual wiki notation. 20px - 25px width is usually about right. For example:
smallimageright = [[File:Nuvola apps bookcase.png|20px|alt=Three stacked books]]
Anything = Any other object that you want to show on the right side.
none = Means that no right side image is used. This overrides any image fed to imageright, when "small=left".

Template loop detected: Template:Mbox

smalltext

A shorter version of the message body text. If no smalltext parameter is given then this template falls back to use the text parameter.

Technical details

If you need to use special characters in the text parameter then you need to escape them like this:

{{mbox
| text  = <div>
Equal sign = and a start and end brace { } work fine as they are.
But here is a pipe &#124; and two end braces <nowiki>}}</nowiki>.
And now a pipe and end braces <nowiki>|}}</nowiki>.
</div>
}}

Template loop detected: Template:Mbox

The <div> tags that surround the text in the example above are usually not needed. But if the text contains line breaks then sometimes we get weird line spacing. This especially happens when using vertical dotted lists. Then use the div tags to fix that.

This template uses CSS classes in MediaWiki:Common.css for most of its looks, thus it is fully skinnable.

This template calls Template:Tl which holds most of the code for Template:Tl, while Template:Tl itself does parameter preprocessing.

Internally this meta-template uses HTML wikimarkup instead of wikimarkup for the table code. That is the usual way we make meta-templates since wikimarkup has several drawbacks. For instance it makes it harder to use parser functions and some special characters in parameters.

The default images for this meta-template are in png format instead of svg format. The main reason is that some older web browsers have trouble with the transparent background that MediaWiki renders for svg images. The png images here have hand optimised transparent background colour so they look good in all browsers. Note that svg icons only look somewhat bad in the old browsers, thus such hand optimisation is only worth the trouble for very widely used icons.

For more technical details see the talk page and the "See also" links below.

See also

Template:Mbox templates Other pages:

</text><sha1>5cafb545bbublgg4mei08dvwxs9zay9</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Mbox templates</title><ns>10</ns><id>95150</id><revision><id>692773</id><parentid>565939</parentid><timestamp>2013-05-21T16:37:34Z</timestamp><contributor><ip>90.209.78.127</ip></contributor><text xml:space="preserve" bytes="268">Template:Nmbox</text><sha1>mm2hquqpmw1k85xftye00jkid2a0l4u</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Namespace detect</title><ns>10</ns><id>79689</id><revision><id>695915</id><parentid>497627</parentid><timestamp>2013-05-27T09:23:36Z</timestamp><contributor><ip>81.129.84.113</ip></contributor><text xml:space="preserve" bytes="1470">{{#switch:

 {{#if: 
   | {{{demospace}}}
   | {{#if: 
     | 
       {{#ifeq:|
       | talk
       |  
       }}
     | 
       {{#ifeq:template|template talk
       | talk
       | template 
       }}
     }}
   }}

| main | = | talk = | user = | project = | file | image = File:Merge-arrows.svg | mediawiki = | template = | help = | category = | book = | extension = | other | #default =

}}</text><sha1>qry2n28n1p12gxaxgu7gs1bkzywbpqv</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Nmbox</title><ns>10</ns><id>47495</id><revision><id>556782</id><parentid>328128</parentid><timestamp>2012-06-29T10:35:15Z</timestamp><contributor><username>Krinkle</username><id>135822</id></contributor><text xml:space="preserve" bytes="587"> {{#if:File:Merge-arrows.svg | |

}}

File:Merge-arrows.svg type = move
image = [[File:Merge-arrows.svg|50px|link=|alt=]]
This image is used for Template:Tl etc.
</text><sha1>6k7jc6wiy6i7qy82dd4dw1xja6e8k5w</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Ombox</title><ns>10</ns><id>93344</id><revision><id>634878</id><parentid>634793</parentid><timestamp>2013-01-25T22:39:30Z</timestamp><contributor><username>Kaldari</username><id>31661</id></contributor><comment>reverting breakage</comment><text xml:space="preserve" bytes="723">{{#ifeq:|yes

| Template:Ombox/core | Template:Ombox/core

}}</text><sha1>p9vh00dqvq0u1q3950ueg6abd93dyrt</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Ombox/core</title><ns>10</ns><id>93345</id><revision><id>680423</id><parentid>680422</parentid><timestamp>2013-04-29T09:31:02Z</timestamp><contributor><username>Siebrand</username><id>5665</id></contributor><minor/><comment>Protected "Template:Ombox/core": Highly visible template ([Edit=Allow only autoconfirmed users] (indefinite) [Move=Allow only autoconfirmed users] (indefinite))</comment><text xml:space="preserve" bytes="2250"> {{#ifeq:File:Merge-arrows.svg|none | | }}

{{#if: | {{#ifeq:|none

 | 
|
 }}

}}

{{#switch:move

| | critical | important | warning | caution | license | speedy | delete | content | style | move | protection | notice =

| #default =
This message box is using an invalid "type=move" parameter and needs fixing.
[[Category:Wikipedia message box parameter needs fixing|Template:Main otherTemplate:Mbox]]

}}</text><sha1>l3n9mp2c6ch14gekpe1oxxe8thp3xdb</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Para</title><ns>10</ns><id>40658</id><revision><id>557339</id><parentid>557338</parentid><timestamp>2012-06-30T23:27:18Z</timestamp><contributor><username>Reedy</username><id>28424</id></contributor><minor/><comment>1 revision from w:en:Template:Para</comment><text xml:space="preserve" bytes="238">|{{#if:|{{{1}}}=|}}</text><sha1>3ve3qhqjaafu9wuy6em7y1fz49qyqfx</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Purge</title><ns>10</ns><id>31341</id><revision><id>405355</id><parentid>405354</parentid><timestamp>2011-05-24T01:39:17Z</timestamp><contributor><username>Peachey88</username><id>31302</id></contributor><minor/><comment>1 revision from w:en:Template:Purge: update to en.wiki</comment><text xml:space="preserve" bytes="197">Purge</text><sha1>830osaj62tvmlh6zq374ixtzbukxcih</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Tl</title><ns>10</ns><id>12644</id><redirect title="Template:Tlx"/><revision><id>760820</id><parentid>760712</parentid><timestamp>2013-08-10T10:29:27Z</timestamp><contributor><username>IAlex</username><id>17961</id></contributor><minor/><comment>Reverted edits by 175.200.179.56 (talk) to last revision by Varnent</comment><text xml:space="preserve" bytes="25">#REDIRECTTemplate:Tlx</text><sha1>avv0qklcaxr8n5r45lcc2x17y9w78sc</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Tlx</title><ns>10</ns><id>20809</id><revision><id>557363</id><parentid>534113</parentid><timestamp>2012-06-30T23:27:22Z</timestamp><contributor><username>Reedy</username><id>28424</id></contributor><minor/><comment>1 revision from w:en:Template:Tlx</comment><text xml:space="preserve" bytes="385">{{[[Template:|]]{{#if:| |{{{2}}} }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}}</text><sha1>0d6b5bkc7j2tegvw2yzm4b6iil98xqg</sha1>

More examples

Some other parameter combinations.

<mediawiki xsi:schemaLocation="http://www.mediawiki.org/xml/export-0.8/ http://www.mediawiki.org/xml/export-0.8.xsd" version="0.8" xml:lang="en"><siteinfo><sitename>MediaWiki</sitename><base>http://www.mediawiki.org/wiki/MediaWiki</base><generator>MediaWiki 1.22wmf12</generator><case>first-letter</case><namespaces><namespace key="-2" case="first-letter">Media</namespace><namespace key="-1" case="first-letter">Special</namespace><namespace key="0" case="first-letter"/><namespace key="1" case="first-letter">Talk</namespace><namespace key="2" case="first-letter">User</namespace><namespace key="3" case="first-letter">User talk</namespace><namespace key="4" case="first-letter">Project</namespace><namespace key="5" case="first-letter">Project talk</namespace><namespace key="6" case="first-letter">File</namespace><namespace key="7" case="first-letter">File talk</namespace><namespace key="8" case="first-letter">MediaWiki</namespace><namespace key="9" case="first-letter">MediaWiki talk</namespace><namespace key="10" case="first-letter">Template</namespace><namespace key="11" case="first-letter">Template talk</namespace><namespace key="12" case="first-letter">Help</namespace><namespace key="13" case="first-letter">Help talk</namespace><namespace key="14" case="first-letter">Category</namespace><namespace key="15" case="first-letter">Category talk</namespace><namespace key="90" case="first-letter">Thread</namespace><namespace key="91" case="first-letter">Thread talk</namespace><namespace key="92" case="first-letter">Summary</namespace><namespace key="93" case="first-letter">Summary talk</namespace><namespace key="100" case="first-letter">Manual</namespace><namespace key="101" case="first-letter">Manual talk</namespace><namespace key="102" case="first-letter">Extension</namespace><namespace key="103" case="first-letter">Extension talk</namespace><namespace key="104" case="first-letter">API</namespace><namespace key="105" case="first-letter">API talk</namespace><namespace key="106" case="first-letter">Skin</namespace><namespace key="107" case="first-letter">Skin talk</namespace><namespace key="828" case="first-letter">Module</namespace><namespace key="829" case="first-letter">Module talk</namespace><namespace key="1198" case="first-letter">Translations</namespace><namespace key="1199" case="first-letter">Translations talk</namespace><namespace key="2500" case="first-letter">VisualEditor</namespace><namespace key="2501" case="first-letter">VisualEditor talk</namespace></namespaces></siteinfo><page><title>Template:Mbox</title><ns>10</ns><id>45372</id><revision><id>634882</id><parentid>634876</parentid><timestamp>2013-01-25T22:40:38Z</timestamp><contributor><username>Kaldari</username><id>31661</id></contributor><comment>reverting self, problem was in ombox template</comment><text xml:space="preserve" bytes="707">{{

 Template:Namespace detect

| type = | image = | imageright = | class = | style = | textstyle = | text = No type and no image given (default) | small = | smallimage = | smallimageright = | smalltext = | subst = | date = | name = }}</text><sha1>40w6e1mdq2t695t9dv143e1rzq5pv1o</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation</title><ns>10</ns><id>20803</id><revision><id>688512</id><parentid>687083</parentid><timestamp>2013-05-11T17:18:34Z</timestamp><contributor><username>Wargo</username><id>25061</id></contributor><text xml:space="preserve" bytes="2079">{{#ifeq: Mbox | sandbox

|
Template:Template sandbox notice

}}Template:Documentation/start box2 {{#switch: {{#if:|1|0}}{{#if:|1|0}}{{#ifexist:|1|0}}{{#ifexist:Template:Documentation/docspace:Template:Documentation/template page/doc|1|0}} | 1000 | 1001 | 1010 | 1011 | 1100 | 1101 | 1110 | 1111 = | 0110 | 0111 = {{ {{{1}}} }} | 0001 | 0011 = {{ Template:Documentation/docspace:Template:Documentation/template page/doc }} | 0000 | 0100 | 0010 | 0101 = }} Template:Documentation/end box2</text><sha1>bvikrz5412m4gizkphh8ftj604e3kbf</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/docspace</title><ns>10</ns><id>93323</id><revision><id>631615</id><parentid>557279</parentid><timestamp>2013-01-20T15:55:26Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><minor/><comment>1 revision from w:en:Template:Documentation/docspace: Requested by average_drifter in #mediawiki</comment><text xml:space="preserve" bytes="302">{{#switch: Template

 | 
 | File
 | MediaWiki
 | Category = Template talk
 | #default = Template
}}</text><sha1>7f8iymss9sr4v7f4t5pza1arwjogrv3</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/end box</title><ns>10</ns><id>93324</id><revision><id>631856</id><parentid>631623</parentid><timestamp>2013-01-20T16:24:41Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><text xml:space="preserve" bytes="4124">

{{#if:

 {{#ifeq:  | off
 |
 | yes{{
   #switch: Template
   | User
   | Template = yes
   }}
 }}

| Template:Fmbox }}{{#if:

 {{#switch: Mbox
 | doc
 | testcases = strange
 }}

| [[Category:Wikipedia pages with strange ((documentation)) usage|Template:Main otherTemplate:Mbox]]

}}</text><sha1>r3qht4u0hwps2mqnst3puyi8anb9dmz</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/end box2</title><ns>10</ns><id>124329</id><revision><id>688362</id><parentid>688359</parentid><timestamp>2013-05-11T09:36:55Z</timestamp><contributor><username>Shirayuki</username><id>472859</id></contributor><comment>Undo revision 688359 by Shirayuki (talk)</comment><text xml:space="preserve" bytes="864">Template:Documentation/end box</text><sha1>sfe0ppdpxp1nwfzhpym4jwdtmgpph1p</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/start box</title><ns>10</ns><id>93326</id><revision><id>742132</id><parentid>742131</parentid><timestamp>2013-07-20T14:04:29Z</timestamp><contributor><ip>81.129.86.23</ip></contributor><text xml:space="preserve" bytes="2002">

{{#ifeq: ¬ |

|

|
{{#switch: ¬
 | ¬ =   
   {{#switch: Template 
   | Template = File:Template-info.png Template documentation
   | Template:Ns:Module = File:Template-info.png Module documentation
   | File = Summary
   | #default = Documentation
   }}
 | #default = 
   
 }}{{
 #if: 
 | 
 | 
   {{
   #if: yes
   | [view] [edit] [history] [[[:Template:Purge]]] 
   | 
     [#if:  _        | %7B%7B%7Bpreload%7D%7D%7D_        | {{#ifeq: Template | File_          | Template:Documentation/preload-filespace_          | Template:Documentation/preload_          }} }} create]
   }}
}}

}}</text><sha1>linb792zr3zrp72qrhjkmqg1mz6uevr</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/start box2</title><ns>10</ns><id>93327</id><revision><id>631642</id><parentid>585737</parentid><timestamp>2013-01-20T15:55:27Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><minor/><comment>4 revisions from w:en:Template:Documentation/start box2: Requested by average_drifter in #mediawiki</comment><text xml:space="preserve" bytes="625">Template:Documentation/start box</text><sha1>t5j6y918odlsx0iuls0qgi6wbl050q3</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/template page</title><ns>10</ns><id>93328</id><revision><id>631644</id><parentid>557289</parentid><timestamp>2013-01-20T15:55:27Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><minor/><comment>1 revision from w:en:Template:Documentation/template page: Requested by average_drifter in #mediawiki</comment><text xml:space="preserve" bytes="232">{{#switch: Mbox | sandbox | testcases = Mbox | #default = Mbox }}</text><sha1>fenc3r6oe2sito28b1d8xgyo9gpq5uf</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation subpage</title><ns>10</ns><id>20806</id><revision><id>757428</id><parentid>715052</parentid><timestamp>2013-08-05T14:14:46Z</timestamp><contributor><username>IAlex</username><id>17961</id></contributor><minor/><comment>Reverted edits by 90.219.4.40 (talk) to last revision by Shirayuki</comment><text xml:space="preserve" bytes="2616">{{#if: |

File:Edit-paste.svg This is the template documentation page for Template:Mbox.
This page may not be intended to be viewed directly.
Links using variables may appear broken; do not replace these with hardcoded page names or URLs.
{{#if:x||

}} |{{#ifeq: mbox | doc

 | 

{{

   #ifeq: show | show
   | Template loop detected: Template:Mbox
   }}{{
   #if: 
   | 
   | {{#ifeq:Template|Template|}}
 }}

| }}

}}</text><sha1>7a3si8r4k2z0aqxpbbxz1c0gmny5pb9</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Fmbox</title><ns>10</ns><id>37655</id><revision><id>558796</id><parentid>558707</parentid><timestamp>2012-07-05T06:11:26Z</timestamp><contributor><username>Krinkle</username><id>135822</id></contributor><comment>update from enwiki</comment><text xml:space="preserve" bytes="1344"> {{#ifeq:|none | | }}

{{#if:

|

}}

{{#switch:

| | warning | editnotice | system =

| #default =
This message box is using an invalid "type=" parameter and needs fixing.
[[Category:Wikipedia message box parameter needs fixing|Template:Main otherTemplate:Mbox]]

}}</text><sha1>mrldgfpkjyqf89ukmq2vy7gh3ir2j7i</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Mbox/doc</title><ns>10</ns><id>45374</id><revision><id>659649</id><parentid>651771</parentid><timestamp>2013-03-14T09:07:42Z</timestamp><contributor><username>Krinkle</username><id>135822</id></contributor><text xml:space="preserve" bytes="14176">Template:Documentation subpage This is the Template:Tl or message box meta-template.

It is used to build message box templates such as Template:Tl. It offers several different colours, uses default images if no image parameter is given and it has some other features.

This meta-template uses the mbox CSS classes in MediaWiki:Common.css. The classes can also be used directly in a wikitable if special functionality is needed. See the how-to guide for that.

Usage

Simple usage example:

{{mbox | text = Some text.}}

Template loop detected: Template:Mbox Complex example:

{{mbox
| type       = style
| small      = left
| image      = [[File:Emblem-question-yellow.svg|40px|alt=Question mark]]
| smallimage = [[File:Emblem-question-yellow.svg|20px|alt=Question mark]]
| textstyle  = color: red; font-weight: bold; font-style: italic;
| text       = Text for a big box, for the top of articles.
| smalltext  = Text for the top of article sections.
}}

Template loop detected: Template:Mbox

But you are not really supposed to use red bold italic text.

Message box types

The following examples use different type parameters but use no image parameters thus they use the default images for each type.

Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox

Other images

The default images shown above are mostly for convenience. In many cases it is more appropriate to use more specific images. These examples use the image parameter to specify an image other than the default images.

Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox

More examples

Some other parameter combinations.

Template loop detected: Template:Mbox Template loop detected: Template:Mbox

Template loop detected: Template:Mbox

Template loop detected: Template:Mbox

Parameters

List of all parameters:

{{mbox
| type  = critical / serious / warning / notice / / move / protection
| image = none / [[File:...|40px|...]]
| imagewidth = width of image section / default is 52px
| imageright = [[File:...|40px|...]]
| imagerightwidth = width of right image section / default is 52px
| style = CSS values
| textstyle = CSS values
| text  = The message body text.
| small = {{{small|}}} / left
| smallimage = none / [[File:...|20px|...]]
| smallimageright = none / [[File:...|20px|...]]
| smalltext  = A shorter message body text.
}}

type

If no type parameter is given the template has a 'blank' style.

image

No parameter = If no image parameter is given the template uses a default image. Which default image it uses depends on the type parameter.
An image = Should be an image with usual wiki notation. Widths of 40px - 50px are usually about right. (Images over 52 pixels wide will cause padding problems, unless you also set imagewidth.)
Often an icon is purely decorative in the W3C sense that it repeats the text. To improve accessibility, it is desirable to not have it be announced by screen readers, as well as to avoid it linking to an irrelevant page. If (and only if) the image license allows this, it can be marked with "Template:ParaTemplate:Para". For example:
image = [[File:Unbalanced scales.svg|40px|link=|alt=]]
Conversely, an icon that does not use "Template:ParaTemplate:Para", and which therefore is announced to visually impaired readers, should use an "Template:Para" parameter that describes the icon. With no Template:Para parameter (using the default link), the alt text should describe the icon's visual appearance. For example:
image = [[File:Gnome globe current event.svg|40px|alt=Clock over a larger globe]]
With a nonempty "Template:Para" the alt text should describe the icon's function. For example:
image = [[File:Purple question mark.svg|40px|link=Special:Random|alt=Random article]]
An icon whose license requires attribution may have alt text, but must keep the default link. Although public domain images do not require a link, many licenses do require one. Please see Purely decorative images for more information about licensing.
none = Means that no image is used.
blank = This parameter is now deprecated. If you see it in use, change it to "image=none".

imagewidth

Optional CSS value used to set width of image's div section. Allowing you to use images wider than the default 52px wide.
Example
imagewidth=100px

imageright

No parameter = If no imageright parameter is given then no image is shown on the right side.
An image = Should be an image with usual wiki notation. 40px - 50px width are usually about right depending on the image height to width ratio. (Images over 52 pixels width will cause padding problems, unless you also set imagerightwidth.) For example:
imageright = [[File:Nuvola apps bookcase.png|40px|alt=Three stacked books]]
Anything = Any other object that you want to show on the right side.

imagerightwidth

Optional CSS value used to set width of image's div section. Allowing you to use images wider than the default 52px wide.
Example
imagerightwidth=100px

style

Optional CSS values used by the entire message box table. Without quotation marks " " but with the ending semicolons ;. For example:
style = margin-bottom: 0.5em;

textstyle

Optional CSS values used by the text cell. For example:
textstyle = text-align: center;

text

The message body text.

The small parameters

The small article message boxes are meant for the top of sections. Normally they should only contain one or two lines of text.

small

left = Makes it a smaller left aligned message box. This also makes the default images smaller. Note that any data fed to the smallimage, smallimageright and smalltext parameters is only used if "small=left". To make it so your template also understands the small parameter you can use this code:
small = {{{small|}}}

Template loop detected: Template:Mbox Template loop detected: Template:Mbox

smallimage

No parameter = If no smallimage parameter is given then this template falls back to use the image parameter. If the image parameter also is empty then a small default image is used.
An image = Should be an image with usual wiki notation. 20px width is usually about right for boxes with one line of text, while 25px width is usually about right for boxes with two lines of text. For example:
smallimage = [[File:Gnome globe current event.svg|20px|alt=Clock over a larger globe]]
none = Means that no image is used. This overrides any image fed to image, when "small=left".

Template loop detected: Template:Mbox

smallimageright

No parameter = If no smallimageright parameter is given then this template falls back to use the imageright parameter. If the imageright parameter also is empty then no image is shown on the right side.
An image = Should be an image with usual wiki notation. 20px - 25px width is usually about right. For example:
smallimageright = [[File:Nuvola apps bookcase.png|20px|alt=Three stacked books]]
Anything = Any other object that you want to show on the right side.
none = Means that no right side image is used. This overrides any image fed to imageright, when "small=left".

Template loop detected: Template:Mbox

smalltext

A shorter version of the message body text. If no smalltext parameter is given then this template falls back to use the text parameter.

Technical details

If you need to use special characters in the text parameter then you need to escape them like this:

{{mbox
| text  = <div>
Equal sign = and a start and end brace { } work fine as they are.
But here is a pipe &#124; and two end braces <nowiki>}}</nowiki>.
And now a pipe and end braces <nowiki>|}}</nowiki>.
</div>
}}

Template loop detected: Template:Mbox

The <div> tags that surround the text in the example above are usually not needed. But if the text contains line breaks then sometimes we get weird line spacing. This especially happens when using vertical dotted lists. Then use the div tags to fix that.

This template uses CSS classes in MediaWiki:Common.css for most of its looks, thus it is fully skinnable.

This template calls Template:Tl which holds most of the code for Template:Tl, while Template:Tl itself does parameter preprocessing.

Internally this meta-template uses HTML wikimarkup instead of wikimarkup for the table code. That is the usual way we make meta-templates since wikimarkup has several drawbacks. For instance it makes it harder to use parser functions and some special characters in parameters.

The default images for this meta-template are in png format instead of svg format. The main reason is that some older web browsers have trouble with the transparent background that MediaWiki renders for svg images. The png images here have hand optimised transparent background colour so they look good in all browsers. Note that svg icons only look somewhat bad in the old browsers, thus such hand optimisation is only worth the trouble for very widely used icons.

For more technical details see the talk page and the "See also" links below.

See also

Template:Mbox templates Other pages:

</text><sha1>5cafb545bbublgg4mei08dvwxs9zay9</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Mbox templates</title><ns>10</ns><id>95150</id><revision><id>692773</id><parentid>565939</parentid><timestamp>2013-05-21T16:37:34Z</timestamp><contributor><ip>90.209.78.127</ip></contributor><text xml:space="preserve" bytes="268">Template:Nmbox</text><sha1>mm2hquqpmw1k85xftye00jkid2a0l4u</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Namespace detect</title><ns>10</ns><id>79689</id><revision><id>695915</id><parentid>497627</parentid><timestamp>2013-05-27T09:23:36Z</timestamp><contributor><ip>81.129.84.113</ip></contributor><text xml:space="preserve" bytes="1470">{{#switch:

 {{#if: 
   | {{{demospace}}}
   | {{#if: 
     | 
       {{#ifeq:|
       | talk
       |  
       }}
     | 
       {{#ifeq:template|template talk
       | talk
       | template 
       }}
     }}
   }}

| main | = | talk = | user = | project = | file | image = | mediawiki = | template = | help = | category = | book = | extension = | other | #default =

}}</text><sha1>qry2n28n1p12gxaxgu7gs1bkzywbpqv</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Nmbox</title><ns>10</ns><id>47495</id><revision><id>556782</id><parentid>328128</parentid><timestamp>2012-06-29T10:35:15Z</timestamp><contributor><username>Krinkle</username><id>135822</id></contributor><text xml:space="preserve" bytes="587"> {{#if: | |

}}

No type and no image given (default)
</text><sha1>6k7jc6wiy6i7qy82dd4dw1xja6e8k5w</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Ombox</title><ns>10</ns><id>93344</id><revision><id>634878</id><parentid>634793</parentid><timestamp>2013-01-25T22:39:30Z</timestamp><contributor><username>Kaldari</username><id>31661</id></contributor><comment>reverting breakage</comment><text xml:space="preserve" bytes="723">{{#ifeq:|yes

| Template:Ombox/core | Template:Ombox/core

}}</text><sha1>p9vh00dqvq0u1q3950ueg6abd93dyrt</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Ombox/core</title><ns>10</ns><id>93345</id><revision><id>680423</id><parentid>680422</parentid><timestamp>2013-04-29T09:31:02Z</timestamp><contributor><username>Siebrand</username><id>5665</id></contributor><minor/><comment>Protected "Template:Ombox/core": Highly visible template ([Edit=Allow only autoconfirmed users] (indefinite) [Move=Allow only autoconfirmed users] (indefinite))</comment><text xml:space="preserve" bytes="2250"> {{#ifeq:|none | | }}

{{#if: | {{#ifeq:|none

 | 
|
 }}

}}

{{#switch:

| | critical | important | warning | caution | license | speedy | delete | content | style | move | protection | notice =

| #default =
This message box is using an invalid "type=" parameter and needs fixing.
[[Category:Wikipedia message box parameter needs fixing|Template:Main otherTemplate:Mbox]]

}}</text><sha1>l3n9mp2c6ch14gekpe1oxxe8thp3xdb</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Para</title><ns>10</ns><id>40658</id><revision><id>557339</id><parentid>557338</parentid><timestamp>2012-06-30T23:27:18Z</timestamp><contributor><username>Reedy</username><id>28424</id></contributor><minor/><comment>1 revision from w:en:Template:Para</comment><text xml:space="preserve" bytes="238">|{{#if:|{{{1}}}=|}}</text><sha1>3ve3qhqjaafu9wuy6em7y1fz49qyqfx</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Purge</title><ns>10</ns><id>31341</id><revision><id>405355</id><parentid>405354</parentid><timestamp>2011-05-24T01:39:17Z</timestamp><contributor><username>Peachey88</username><id>31302</id></contributor><minor/><comment>1 revision from w:en:Template:Purge: update to en.wiki</comment><text xml:space="preserve" bytes="197">Purge</text><sha1>830osaj62tvmlh6zq374ixtzbukxcih</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Tl</title><ns>10</ns><id>12644</id><redirect title="Template:Tlx"/><revision><id>760820</id><parentid>760712</parentid><timestamp>2013-08-10T10:29:27Z</timestamp><contributor><username>IAlex</username><id>17961</id></contributor><minor/><comment>Reverted edits by 175.200.179.56 (talk) to last revision by Varnent</comment><text xml:space="preserve" bytes="25">#REDIRECTTemplate:Tlx</text><sha1>avv0qklcaxr8n5r45lcc2x17y9w78sc</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Tlx</title><ns>10</ns><id>20809</id><revision><id>557363</id><parentid>534113</parentid><timestamp>2012-06-30T23:27:22Z</timestamp><contributor><username>Reedy</username><id>28424</id></contributor><minor/><comment>1 revision from w:en:Template:Tlx</comment><text xml:space="preserve" bytes="385">{{[[Template:|]]{{#if:| |{{{2}}} }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}}</text><sha1>0d6b5bkc7j2tegvw2yzm4b6iil98xqg</sha1> <mediawiki xsi:schemaLocation="http://www.mediawiki.org/xml/export-0.8/ http://www.mediawiki.org/xml/export-0.8.xsd" version="0.8" xml:lang="en"><siteinfo><sitename>MediaWiki</sitename><base>http://www.mediawiki.org/wiki/MediaWiki</base><generator>MediaWiki 1.22wmf12</generator><case>first-letter</case><namespaces><namespace key="-2" case="first-letter">Media</namespace><namespace key="-1" case="first-letter">Special</namespace><namespace key="0" case="first-letter"/><namespace key="1" case="first-letter">Talk</namespace><namespace key="2" case="first-letter">User</namespace><namespace key="3" case="first-letter">User talk</namespace><namespace key="4" case="first-letter">Project</namespace><namespace key="5" case="first-letter">Project talk</namespace><namespace key="6" case="first-letter">File</namespace><namespace key="7" case="first-letter">File talk</namespace><namespace key="8" case="first-letter">MediaWiki</namespace><namespace key="9" case="first-letter">MediaWiki talk</namespace><namespace key="10" case="first-letter">Template</namespace><namespace key="11" case="first-letter">Template talk</namespace><namespace key="12" case="first-letter">Help</namespace><namespace key="13" case="first-letter">Help talk</namespace><namespace key="14" case="first-letter">Category</namespace><namespace key="15" case="first-letter">Category talk</namespace><namespace key="90" case="first-letter">Thread</namespace><namespace key="91" case="first-letter">Thread talk</namespace><namespace key="92" case="first-letter">Summary</namespace><namespace key="93" case="first-letter">Summary talk</namespace><namespace key="100" case="first-letter">Manual</namespace><namespace key="101" case="first-letter">Manual talk</namespace><namespace key="102" case="first-letter">Extension</namespace><namespace key="103" case="first-letter">Extension talk</namespace><namespace key="104" case="first-letter">API</namespace><namespace key="105" case="first-letter">API talk</namespace><namespace key="106" case="first-letter">Skin</namespace><namespace key="107" case="first-letter">Skin talk</namespace><namespace key="828" case="first-letter">Module</namespace><namespace key="829" case="first-letter">Module talk</namespace><namespace key="1198" case="first-letter">Translations</namespace><namespace key="1199" case="first-letter">Translations talk</namespace><namespace key="2500" case="first-letter">VisualEditor</namespace><namespace key="2501" case="first-letter">VisualEditor talk</namespace></namespaces></siteinfo><page><title>Template:Mbox</title><ns>10</ns><id>45372</id><revision><id>634882</id><parentid>634876</parentid><timestamp>2013-01-25T22:40:38Z</timestamp><contributor><username>Kaldari</username><id>31661</id></contributor><comment>reverting self, problem was in ombox template</comment><text xml:space="preserve" bytes="707">{{

 Template:Namespace detect

| type = | image = none | imageright = | class = | style = | textstyle = | text = No type and image=none – No image is used and the text uses the whole message box area. | small = | smallimage = | smallimageright = | smalltext = | subst = | date = | name = }}</text><sha1>40w6e1mdq2t695t9dv143e1rzq5pv1o</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation</title><ns>10</ns><id>20803</id><revision><id>688512</id><parentid>687083</parentid><timestamp>2013-05-11T17:18:34Z</timestamp><contributor><username>Wargo</username><id>25061</id></contributor><text xml:space="preserve" bytes="2079">{{#ifeq: Mbox | sandbox

|
Template:Template sandbox notice

}}Template:Documentation/start box2 {{#switch: {{#if:|1|0}}{{#if:|1|0}}{{#ifexist:|1|0}}{{#ifexist:Template:Documentation/docspace:Template:Documentation/template page/doc|1|0}} | 1000 | 1001 | 1010 | 1011 | 1100 | 1101 | 1110 | 1111 = | 0110 | 0111 = {{ {{{1}}} }} | 0001 | 0011 = {{ Template:Documentation/docspace:Template:Documentation/template page/doc }} | 0000 | 0100 | 0010 | 0101 = }} Template:Documentation/end box2</text><sha1>bvikrz5412m4gizkphh8ftj604e3kbf</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/docspace</title><ns>10</ns><id>93323</id><revision><id>631615</id><parentid>557279</parentid><timestamp>2013-01-20T15:55:26Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><minor/><comment>1 revision from w:en:Template:Documentation/docspace: Requested by average_drifter in #mediawiki</comment><text xml:space="preserve" bytes="302">{{#switch: Template

 | 
 | File
 | MediaWiki
 | Category = Template talk
 | #default = Template
}}</text><sha1>7f8iymss9sr4v7f4t5pza1arwjogrv3</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/end box</title><ns>10</ns><id>93324</id><revision><id>631856</id><parentid>631623</parentid><timestamp>2013-01-20T16:24:41Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><text xml:space="preserve" bytes="4124">

{{#if:

 {{#ifeq:  | off
 |
 | yes{{
   #switch: Template
   | User
   | Template = yes
   }}
 }}

| Template:Fmbox }}{{#if:

 {{#switch: Mbox
 | doc
 | testcases = strange
 }}

| [[Category:Wikipedia pages with strange ((documentation)) usage|Template:Main otherTemplate:Mbox]]

}}</text><sha1>r3qht4u0hwps2mqnst3puyi8anb9dmz</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/end box2</title><ns>10</ns><id>124329</id><revision><id>688362</id><parentid>688359</parentid><timestamp>2013-05-11T09:36:55Z</timestamp><contributor><username>Shirayuki</username><id>472859</id></contributor><comment>Undo revision 688359 by Shirayuki (talk)</comment><text xml:space="preserve" bytes="864">Template:Documentation/end box</text><sha1>sfe0ppdpxp1nwfzhpym4jwdtmgpph1p</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/start box</title><ns>10</ns><id>93326</id><revision><id>742132</id><parentid>742131</parentid><timestamp>2013-07-20T14:04:29Z</timestamp><contributor><ip>81.129.86.23</ip></contributor><text xml:space="preserve" bytes="2002">

{{#ifeq: ¬ |

|

|
{{#switch: ¬
 | ¬ =   
   {{#switch: Template 
   | Template = File:Template-info.png Template documentation
   | Template:Ns:Module = File:Template-info.png Module documentation
   | File = Summary
   | #default = Documentation
   }}
 | #default = 
   
 }}{{
 #if: 
 | 
 | 
   {{
   #if: yes
   | [view] [edit] [history] [[[:Template:Purge]]] 
   | 
     [#if:  _        | %7B%7B%7Bpreload%7D%7D%7D_        | {{#ifeq: Template | File_          | Template:Documentation/preload-filespace_          | Template:Documentation/preload_          }} }} create]
   }}
}}

}}</text><sha1>linb792zr3zrp72qrhjkmqg1mz6uevr</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/start box2</title><ns>10</ns><id>93327</id><revision><id>631642</id><parentid>585737</parentid><timestamp>2013-01-20T15:55:27Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><minor/><comment>4 revisions from w:en:Template:Documentation/start box2: Requested by average_drifter in #mediawiki</comment><text xml:space="preserve" bytes="625">Template:Documentation/start box</text><sha1>t5j6y918odlsx0iuls0qgi6wbl050q3</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/template page</title><ns>10</ns><id>93328</id><revision><id>631644</id><parentid>557289</parentid><timestamp>2013-01-20T15:55:27Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><minor/><comment>1 revision from w:en:Template:Documentation/template page: Requested by average_drifter in #mediawiki</comment><text xml:space="preserve" bytes="232">{{#switch: Mbox | sandbox | testcases = Mbox | #default = Mbox }}</text><sha1>fenc3r6oe2sito28b1d8xgyo9gpq5uf</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation subpage</title><ns>10</ns><id>20806</id><revision><id>757428</id><parentid>715052</parentid><timestamp>2013-08-05T14:14:46Z</timestamp><contributor><username>IAlex</username><id>17961</id></contributor><minor/><comment>Reverted edits by 90.219.4.40 (talk) to last revision by Shirayuki</comment><text xml:space="preserve" bytes="2616">{{#if: |

File:Edit-paste.svg This is the template documentation page for Template:Mbox.
This page may not be intended to be viewed directly.
Links using variables may appear broken; do not replace these with hardcoded page names or URLs.
{{#if:x||

}} |{{#ifeq: mbox | doc

 | 

{{

   #ifeq: show | show
   | Template loop detected: Template:Mbox
   }}{{
   #if: 
   | 
   | {{#ifeq:Template|Template|}}
 }}

| }}

}}</text><sha1>7a3si8r4k2z0aqxpbbxz1c0gmny5pb9</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Fmbox</title><ns>10</ns><id>37655</id><revision><id>558796</id><parentid>558707</parentid><timestamp>2012-07-05T06:11:26Z</timestamp><contributor><username>Krinkle</username><id>135822</id></contributor><comment>update from enwiki</comment><text xml:space="preserve" bytes="1344"> {{#ifeq:none|none | | }}

{{#if:

|

}}

{{#switch:

| | warning | editnotice | system =

| #default =
This message box is using an invalid "type=" parameter and needs fixing.
[[Category:Wikipedia message box parameter needs fixing|Template:Main otherTemplate:Mbox]]

}}</text><sha1>mrldgfpkjyqf89ukmq2vy7gh3ir2j7i</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Mbox/doc</title><ns>10</ns><id>45374</id><revision><id>659649</id><parentid>651771</parentid><timestamp>2013-03-14T09:07:42Z</timestamp><contributor><username>Krinkle</username><id>135822</id></contributor><text xml:space="preserve" bytes="14176">Template:Documentation subpage This is the Template:Tl or message box meta-template.

It is used to build message box templates such as Template:Tl. It offers several different colours, uses default images if no image parameter is given and it has some other features.

This meta-template uses the mbox CSS classes in MediaWiki:Common.css. The classes can also be used directly in a wikitable if special functionality is needed. See the how-to guide for that.

Usage

Simple usage example:

{{mbox | text = Some text.}}

Template loop detected: Template:Mbox Complex example:

{{mbox
| type       = style
| small      = left
| image      = [[File:Emblem-question-yellow.svg|40px|alt=Question mark]]
| smallimage = [[File:Emblem-question-yellow.svg|20px|alt=Question mark]]
| textstyle  = color: red; font-weight: bold; font-style: italic;
| text       = Text for a big box, for the top of articles.
| smalltext  = Text for the top of article sections.
}}

Template loop detected: Template:Mbox

But you are not really supposed to use red bold italic text.

Message box types

The following examples use different type parameters but use no image parameters thus they use the default images for each type.

Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox

Other images

The default images shown above are mostly for convenience. In many cases it is more appropriate to use more specific images. These examples use the image parameter to specify an image other than the default images.

Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox

More examples

Some other parameter combinations.

Template loop detected: Template:Mbox Template loop detected: Template:Mbox

Template loop detected: Template:Mbox

Template loop detected: Template:Mbox

Parameters

List of all parameters:

{{mbox
| type  = critical / serious / warning / notice / / move / protection
| image = none / [[File:...|40px|...]]
| imagewidth = width of image section / default is 52px
| imageright = [[File:...|40px|...]]
| imagerightwidth = width of right image section / default is 52px
| style = CSS values
| textstyle = CSS values
| text  = The message body text.
| small = {{{small|}}} / left
| smallimage = none / [[File:...|20px|...]]
| smallimageright = none / [[File:...|20px|...]]
| smalltext  = A shorter message body text.
}}

type

If no type parameter is given the template has a 'blank' style.

image

No parameter = If no image parameter is given the template uses a default image. Which default image it uses depends on the type parameter.
An image = Should be an image with usual wiki notation. Widths of 40px - 50px are usually about right. (Images over 52 pixels wide will cause padding problems, unless you also set imagewidth.)
Often an icon is purely decorative in the W3C sense that it repeats the text. To improve accessibility, it is desirable to not have it be announced by screen readers, as well as to avoid it linking to an irrelevant page. If (and only if) the image license allows this, it can be marked with "Template:ParaTemplate:Para". For example:
image = [[File:Unbalanced scales.svg|40px|link=|alt=]]
Conversely, an icon that does not use "Template:ParaTemplate:Para", and which therefore is announced to visually impaired readers, should use an "Template:Para" parameter that describes the icon. With no Template:Para parameter (using the default link), the alt text should describe the icon's visual appearance. For example:
image = [[File:Gnome globe current event.svg|40px|alt=Clock over a larger globe]]
With a nonempty "Template:Para" the alt text should describe the icon's function. For example:
image = [[File:Purple question mark.svg|40px|link=Special:Random|alt=Random article]]
An icon whose license requires attribution may have alt text, but must keep the default link. Although public domain images do not require a link, many licenses do require one. Please see Purely decorative images for more information about licensing.
none = Means that no image is used.
blank = This parameter is now deprecated. If you see it in use, change it to "image=none".

imagewidth

Optional CSS value used to set width of image's div section. Allowing you to use images wider than the default 52px wide.
Example
imagewidth=100px

imageright

No parameter = If no imageright parameter is given then no image is shown on the right side.
An image = Should be an image with usual wiki notation. 40px - 50px width are usually about right depending on the image height to width ratio. (Images over 52 pixels width will cause padding problems, unless you also set imagerightwidth.) For example:
imageright = [[File:Nuvola apps bookcase.png|40px|alt=Three stacked books]]
Anything = Any other object that you want to show on the right side.

imagerightwidth

Optional CSS value used to set width of image's div section. Allowing you to use images wider than the default 52px wide.
Example
imagerightwidth=100px

style

Optional CSS values used by the entire message box table. Without quotation marks " " but with the ending semicolons ;. For example:
style = margin-bottom: 0.5em;

textstyle

Optional CSS values used by the text cell. For example:
textstyle = text-align: center;

text

The message body text.

The small parameters

The small article message boxes are meant for the top of sections. Normally they should only contain one or two lines of text.

small

left = Makes it a smaller left aligned message box. This also makes the default images smaller. Note that any data fed to the smallimage, smallimageright and smalltext parameters is only used if "small=left". To make it so your template also understands the small parameter you can use this code:
small = {{{small|}}}

Template loop detected: Template:Mbox Template loop detected: Template:Mbox

smallimage

No parameter = If no smallimage parameter is given then this template falls back to use the image parameter. If the image parameter also is empty then a small default image is used.
An image = Should be an image with usual wiki notation. 20px width is usually about right for boxes with one line of text, while 25px width is usually about right for boxes with two lines of text. For example:
smallimage = [[File:Gnome globe current event.svg|20px|alt=Clock over a larger globe]]
none = Means that no image is used. This overrides any image fed to image, when "small=left".

Template loop detected: Template:Mbox

smallimageright

No parameter = If no smallimageright parameter is given then this template falls back to use the imageright parameter. If the imageright parameter also is empty then no image is shown on the right side.
An image = Should be an image with usual wiki notation. 20px - 25px width is usually about right. For example:
smallimageright = [[File:Nuvola apps bookcase.png|20px|alt=Three stacked books]]
Anything = Any other object that you want to show on the right side.
none = Means that no right side image is used. This overrides any image fed to imageright, when "small=left".

Template loop detected: Template:Mbox

smalltext

A shorter version of the message body text. If no smalltext parameter is given then this template falls back to use the text parameter.

Technical details

If you need to use special characters in the text parameter then you need to escape them like this:

{{mbox
| text  = <div>
Equal sign = and a start and end brace { } work fine as they are.
But here is a pipe &#124; and two end braces <nowiki>}}</nowiki>.
And now a pipe and end braces <nowiki>|}}</nowiki>.
</div>
}}

Template loop detected: Template:Mbox

The <div> tags that surround the text in the example above are usually not needed. But if the text contains line breaks then sometimes we get weird line spacing. This especially happens when using vertical dotted lists. Then use the div tags to fix that.

This template uses CSS classes in MediaWiki:Common.css for most of its looks, thus it is fully skinnable.

This template calls Template:Tl which holds most of the code for Template:Tl, while Template:Tl itself does parameter preprocessing.

Internally this meta-template uses HTML wikimarkup instead of wikimarkup for the table code. That is the usual way we make meta-templates since wikimarkup has several drawbacks. For instance it makes it harder to use parser functions and some special characters in parameters.

The default images for this meta-template are in png format instead of svg format. The main reason is that some older web browsers have trouble with the transparent background that MediaWiki renders for svg images. The png images here have hand optimised transparent background colour so they look good in all browsers. Note that svg icons only look somewhat bad in the old browsers, thus such hand optimisation is only worth the trouble for very widely used icons.

For more technical details see the talk page and the "See also" links below.

See also

Template:Mbox templates Other pages:

</text><sha1>5cafb545bbublgg4mei08dvwxs9zay9</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Mbox templates</title><ns>10</ns><id>95150</id><revision><id>692773</id><parentid>565939</parentid><timestamp>2013-05-21T16:37:34Z</timestamp><contributor><ip>90.209.78.127</ip></contributor><text xml:space="preserve" bytes="268">Template:Nmbox</text><sha1>mm2hquqpmw1k85xftye00jkid2a0l4u</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Namespace detect</title><ns>10</ns><id>79689</id><revision><id>695915</id><parentid>497627</parentid><timestamp>2013-05-27T09:23:36Z</timestamp><contributor><ip>81.129.84.113</ip></contributor><text xml:space="preserve" bytes="1470">{{#switch:

 {{#if: 
   | {{{demospace}}}
   | {{#if: 
     | 
       {{#ifeq:|
       | talk
       |  
       }}
     | 
       {{#ifeq:template|template talk
       | talk
       | template 
       }}
     }}
   }}

| main | = | talk = | user = | project = | file | image = none | mediawiki = | template = | help = | category = | book = | extension = | other | #default =

}}</text><sha1>qry2n28n1p12gxaxgu7gs1bkzywbpqv</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Nmbox</title><ns>10</ns><id>47495</id><revision><id>556782</id><parentid>328128</parentid><timestamp>2012-06-29T10:35:15Z</timestamp><contributor><username>Krinkle</username><id>135822</id></contributor><text xml:space="preserve" bytes="587"> {{#if:none | |

}}

none No type and image=none – No image is used and the text uses the whole message box area.
</text><sha1>6k7jc6wiy6i7qy82dd4dw1xja6e8k5w</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Ombox</title><ns>10</ns><id>93344</id><revision><id>634878</id><parentid>634793</parentid><timestamp>2013-01-25T22:39:30Z</timestamp><contributor><username>Kaldari</username><id>31661</id></contributor><comment>reverting breakage</comment><text xml:space="preserve" bytes="723">{{#ifeq:|yes

| Template:Ombox/core | Template:Ombox/core

}}</text><sha1>p9vh00dqvq0u1q3950ueg6abd93dyrt</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Ombox/core</title><ns>10</ns><id>93345</id><revision><id>680423</id><parentid>680422</parentid><timestamp>2013-04-29T09:31:02Z</timestamp><contributor><username>Siebrand</username><id>5665</id></contributor><minor/><comment>Protected "Template:Ombox/core": Highly visible template ([Edit=Allow only autoconfirmed users] (indefinite) [Move=Allow only autoconfirmed users] (indefinite))</comment><text xml:space="preserve" bytes="2250"> {{#ifeq:none|none | | }}

{{#if: | {{#ifeq:|none

 | 
|
 }}

}}

{{#switch:

| | critical | important | warning | caution | license | speedy | delete | content | style | move | protection | notice =

| #default =
This message box is using an invalid "type=" parameter and needs fixing.
[[Category:Wikipedia message box parameter needs fixing|Template:Main otherTemplate:Mbox]]

}}</text><sha1>l3n9mp2c6ch14gekpe1oxxe8thp3xdb</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Para</title><ns>10</ns><id>40658</id><revision><id>557339</id><parentid>557338</parentid><timestamp>2012-06-30T23:27:18Z</timestamp><contributor><username>Reedy</username><id>28424</id></contributor><minor/><comment>1 revision from w:en:Template:Para</comment><text xml:space="preserve" bytes="238">|{{#if:|{{{1}}}=|}}</text><sha1>3ve3qhqjaafu9wuy6em7y1fz49qyqfx</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Purge</title><ns>10</ns><id>31341</id><revision><id>405355</id><parentid>405354</parentid><timestamp>2011-05-24T01:39:17Z</timestamp><contributor><username>Peachey88</username><id>31302</id></contributor><minor/><comment>1 revision from w:en:Template:Purge: update to en.wiki</comment><text xml:space="preserve" bytes="197">Purge</text><sha1>830osaj62tvmlh6zq374ixtzbukxcih</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Tl</title><ns>10</ns><id>12644</id><redirect title="Template:Tlx"/><revision><id>760820</id><parentid>760712</parentid><timestamp>2013-08-10T10:29:27Z</timestamp><contributor><username>IAlex</username><id>17961</id></contributor><minor/><comment>Reverted edits by 175.200.179.56 (talk) to last revision by Varnent</comment><text xml:space="preserve" bytes="25">#REDIRECTTemplate:Tlx</text><sha1>avv0qklcaxr8n5r45lcc2x17y9w78sc</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Tlx</title><ns>10</ns><id>20809</id><revision><id>557363</id><parentid>534113</parentid><timestamp>2012-06-30T23:27:22Z</timestamp><contributor><username>Reedy</username><id>28424</id></contributor><minor/><comment>1 revision from w:en:Template:Tlx</comment><text xml:space="preserve" bytes="385">{{[[Template:|]]{{#if:| |{{{2}}} }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}}</text><sha1>0d6b5bkc7j2tegvw2yzm4b6iil98xqg</sha1>

<mediawiki xsi:schemaLocation="http://www.mediawiki.org/xml/export-0.8/ http://www.mediawiki.org/xml/export-0.8.xsd" version="0.8" xml:lang="en"><siteinfo><sitename>MediaWiki</sitename><base>http://www.mediawiki.org/wiki/MediaWiki</base><generator>MediaWiki 1.22wmf12</generator><case>first-letter</case><namespaces><namespace key="-2" case="first-letter">Media</namespace><namespace key="-1" case="first-letter">Special</namespace><namespace key="0" case="first-letter"/><namespace key="1" case="first-letter">Talk</namespace><namespace key="2" case="first-letter">User</namespace><namespace key="3" case="first-letter">User talk</namespace><namespace key="4" case="first-letter">Project</namespace><namespace key="5" case="first-letter">Project talk</namespace><namespace key="6" case="first-letter">File</namespace><namespace key="7" case="first-letter">File talk</namespace><namespace key="8" case="first-letter">MediaWiki</namespace><namespace key="9" case="first-letter">MediaWiki talk</namespace><namespace key="10" case="first-letter">Template</namespace><namespace key="11" case="first-letter">Template talk</namespace><namespace key="12" case="first-letter">Help</namespace><namespace key="13" case="first-letter">Help talk</namespace><namespace key="14" case="first-letter">Category</namespace><namespace key="15" case="first-letter">Category talk</namespace><namespace key="90" case="first-letter">Thread</namespace><namespace key="91" case="first-letter">Thread talk</namespace><namespace key="92" case="first-letter">Summary</namespace><namespace key="93" case="first-letter">Summary talk</namespace><namespace key="100" case="first-letter">Manual</namespace><namespace key="101" case="first-letter">Manual talk</namespace><namespace key="102" case="first-letter">Extension</namespace><namespace key="103" case="first-letter">Extension talk</namespace><namespace key="104" case="first-letter">API</namespace><namespace key="105" case="first-letter">API talk</namespace><namespace key="106" case="first-letter">Skin</namespace><namespace key="107" case="first-letter">Skin talk</namespace><namespace key="828" case="first-letter">Module</namespace><namespace key="829" case="first-letter">Module talk</namespace><namespace key="1198" case="first-letter">Translations</namespace><namespace key="1199" case="first-letter">Translations talk</namespace><namespace key="2500" case="first-letter">VisualEditor</namespace><namespace key="2501" case="first-letter">VisualEditor talk</namespace></namespaces></siteinfo><page><title>Template:Mbox</title><ns>10</ns><id>45372</id><revision><id>634882</id><parentid>634876</parentid><timestamp>2013-01-25T22:40:38Z</timestamp><contributor><username>Kaldari</username><id>31661</id></contributor><comment>reverting self, problem was in ombox template</comment><text xml:space="preserve" bytes="707">{{

 Template:Namespace detect

| type = | image = File:Gnome globe current event.svg | imageright = File:Nuvola apps bookcase.svg | class = | style = | textstyle = | text = image = [[File:Gnome globe current event.svg|42px|alt=Clock over a larger globe]]
imageright = [[File:Nuvola apps bookcase.svg|40px|alt=Three stacked books]] | small = | smallimage = | smallimageright = | smalltext = | subst = | date = | name = }}</text><sha1>40w6e1mdq2t695t9dv143e1rzq5pv1o</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation</title><ns>10</ns><id>20803</id><revision><id>688512</id><parentid>687083</parentid><timestamp>2013-05-11T17:18:34Z</timestamp><contributor><username>Wargo</username><id>25061</id></contributor><text xml:space="preserve" bytes="2079">{{#ifeq: Mbox | sandbox

|
Template:Template sandbox notice

}}Template:Documentation/start box2 {{#switch: {{#if:|1|0}}{{#if:|1|0}}{{#ifexist:|1|0}}{{#ifexist:Template:Documentation/docspace:Template:Documentation/template page/doc|1|0}} | 1000 | 1001 | 1010 | 1011 | 1100 | 1101 | 1110 | 1111 = | 0110 | 0111 = {{ {{{1}}} }} | 0001 | 0011 = {{ Template:Documentation/docspace:Template:Documentation/template page/doc }} | 0000 | 0100 | 0010 | 0101 = }} Template:Documentation/end box2</text><sha1>bvikrz5412m4gizkphh8ftj604e3kbf</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/docspace</title><ns>10</ns><id>93323</id><revision><id>631615</id><parentid>557279</parentid><timestamp>2013-01-20T15:55:26Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><minor/><comment>1 revision from w:en:Template:Documentation/docspace: Requested by average_drifter in #mediawiki</comment><text xml:space="preserve" bytes="302">{{#switch: Template

 | 
 | File
 | MediaWiki
 | Category = Template talk
 | #default = Template
}}</text><sha1>7f8iymss9sr4v7f4t5pza1arwjogrv3</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/end box</title><ns>10</ns><id>93324</id><revision><id>631856</id><parentid>631623</parentid><timestamp>2013-01-20T16:24:41Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><text xml:space="preserve" bytes="4124">

{{#if:

 {{#ifeq:  | off
 |
 | yes{{
   #switch: Template
   | User
   | Template = yes
   }}
 }}

| Template:Fmbox }}{{#if:

 {{#switch: Mbox
 | doc
 | testcases = strange
 }}

| [[Category:Wikipedia pages with strange ((documentation)) usage|Template:Main otherTemplate:Mbox]]

}}</text><sha1>r3qht4u0hwps2mqnst3puyi8anb9dmz</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/end box2</title><ns>10</ns><id>124329</id><revision><id>688362</id><parentid>688359</parentid><timestamp>2013-05-11T09:36:55Z</timestamp><contributor><username>Shirayuki</username><id>472859</id></contributor><comment>Undo revision 688359 by Shirayuki (talk)</comment><text xml:space="preserve" bytes="864">Template:Documentation/end box</text><sha1>sfe0ppdpxp1nwfzhpym4jwdtmgpph1p</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/start box</title><ns>10</ns><id>93326</id><revision><id>742132</id><parentid>742131</parentid><timestamp>2013-07-20T14:04:29Z</timestamp><contributor><ip>81.129.86.23</ip></contributor><text xml:space="preserve" bytes="2002">

{{#ifeq: ¬ |

|

|
{{#switch: ¬
 | ¬ =   
   {{#switch: Template 
   | Template = File:Template-info.png Template documentation
   | Template:Ns:Module = File:Template-info.png Module documentation
   | File = Summary
   | #default = Documentation
   }}
 | #default = 
   
 }}{{
 #if: 
 | 
 | 
   {{
   #if: yes
   | [view] [edit] [history] [[[:Template:Purge]]] 
   | 
     [#if:  _        | %7B%7B%7Bpreload%7D%7D%7D_        | {{#ifeq: Template | File_          | Template:Documentation/preload-filespace_          | Template:Documentation/preload_          }} }} create]
   }}
}}

}}</text><sha1>linb792zr3zrp72qrhjkmqg1mz6uevr</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/start box2</title><ns>10</ns><id>93327</id><revision><id>631642</id><parentid>585737</parentid><timestamp>2013-01-20T15:55:27Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><minor/><comment>4 revisions from w:en:Template:Documentation/start box2: Requested by average_drifter in #mediawiki</comment><text xml:space="preserve" bytes="625">Template:Documentation/start box</text><sha1>t5j6y918odlsx0iuls0qgi6wbl050q3</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/template page</title><ns>10</ns><id>93328</id><revision><id>631644</id><parentid>557289</parentid><timestamp>2013-01-20T15:55:27Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><minor/><comment>1 revision from w:en:Template:Documentation/template page: Requested by average_drifter in #mediawiki</comment><text xml:space="preserve" bytes="232">{{#switch: Mbox | sandbox | testcases = Mbox | #default = Mbox }}</text><sha1>fenc3r6oe2sito28b1d8xgyo9gpq5uf</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation subpage</title><ns>10</ns><id>20806</id><revision><id>757428</id><parentid>715052</parentid><timestamp>2013-08-05T14:14:46Z</timestamp><contributor><username>IAlex</username><id>17961</id></contributor><minor/><comment>Reverted edits by 90.219.4.40 (talk) to last revision by Shirayuki</comment><text xml:space="preserve" bytes="2616">{{#if: |

File:Edit-paste.svg This is the template documentation page for Template:Mbox.
This page may not be intended to be viewed directly.
Links using variables may appear broken; do not replace these with hardcoded page names or URLs.
{{#if:x||

}} |{{#ifeq: mbox | doc

 | 

{{

   #ifeq: show | show
   | Template loop detected: Template:Mbox
   }}{{
   #if: 
   | 
   | {{#ifeq:Template|Template|}}
 }}

| }}

}}</text><sha1>7a3si8r4k2z0aqxpbbxz1c0gmny5pb9</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Fmbox</title><ns>10</ns><id>37655</id><revision><id>558796</id><parentid>558707</parentid><timestamp>2012-07-05T06:11:26Z</timestamp><contributor><username>Krinkle</username><id>135822</id></contributor><comment>update from enwiki</comment><text xml:space="preserve" bytes="1344"> {{#ifeq:File:Gnome globe current event.svg|none | | }}

{{#if:File:Nuvola apps bookcase.svg

|

}}

{{#switch:

| | warning | editnotice | system =

| #default =
This message box is using an invalid "type=" parameter and needs fixing.
[[Category:Wikipedia message box parameter needs fixing|Template:Main otherTemplate:Mbox]]

}}</text><sha1>mrldgfpkjyqf89ukmq2vy7gh3ir2j7i</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Mbox/doc</title><ns>10</ns><id>45374</id><revision><id>659649</id><parentid>651771</parentid><timestamp>2013-03-14T09:07:42Z</timestamp><contributor><username>Krinkle</username><id>135822</id></contributor><text xml:space="preserve" bytes="14176">Template:Documentation subpage This is the Template:Tl or message box meta-template.

It is used to build message box templates such as Template:Tl. It offers several different colours, uses default images if no image parameter is given and it has some other features.

This meta-template uses the mbox CSS classes in MediaWiki:Common.css. The classes can also be used directly in a wikitable if special functionality is needed. See the how-to guide for that.

Usage

Simple usage example:

{{mbox | text = Some text.}}

Template loop detected: Template:Mbox Complex example:

{{mbox
| type       = style
| small      = left
| image      = [[File:Emblem-question-yellow.svg|40px|alt=Question mark]]
| smallimage = [[File:Emblem-question-yellow.svg|20px|alt=Question mark]]
| textstyle  = color: red; font-weight: bold; font-style: italic;
| text       = Text for a big box, for the top of articles.
| smalltext  = Text for the top of article sections.
}}

Template loop detected: Template:Mbox

But you are not really supposed to use red bold italic text.

Message box types

The following examples use different type parameters but use no image parameters thus they use the default images for each type.

Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox

Other images

The default images shown above are mostly for convenience. In many cases it is more appropriate to use more specific images. These examples use the image parameter to specify an image other than the default images.

Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox

More examples

Some other parameter combinations.

Template loop detected: Template:Mbox Template loop detected: Template:Mbox

Template loop detected: Template:Mbox

Template loop detected: Template:Mbox

Parameters

List of all parameters:

{{mbox
| type  = critical / serious / warning / notice / / move / protection
| image = none / [[File:...|40px|...]]
| imagewidth = width of image section / default is 52px
| imageright = [[File:...|40px|...]]
| imagerightwidth = width of right image section / default is 52px
| style = CSS values
| textstyle = CSS values
| text  = The message body text.
| small = {{{small|}}} / left
| smallimage = none / [[File:...|20px|...]]
| smallimageright = none / [[File:...|20px|...]]
| smalltext  = A shorter message body text.
}}

type

If no type parameter is given the template has a 'blank' style.

image

No parameter = If no image parameter is given the template uses a default image. Which default image it uses depends on the type parameter.
An image = Should be an image with usual wiki notation. Widths of 40px - 50px are usually about right. (Images over 52 pixels wide will cause padding problems, unless you also set imagewidth.)
Often an icon is purely decorative in the W3C sense that it repeats the text. To improve accessibility, it is desirable to not have it be announced by screen readers, as well as to avoid it linking to an irrelevant page. If (and only if) the image license allows this, it can be marked with "Template:ParaTemplate:Para". For example:
image = [[File:Unbalanced scales.svg|40px|link=|alt=]]
Conversely, an icon that does not use "Template:ParaTemplate:Para", and which therefore is announced to visually impaired readers, should use an "Template:Para" parameter that describes the icon. With no Template:Para parameter (using the default link), the alt text should describe the icon's visual appearance. For example:
image = [[File:Gnome globe current event.svg|40px|alt=Clock over a larger globe]]
With a nonempty "Template:Para" the alt text should describe the icon's function. For example:
image = [[File:Purple question mark.svg|40px|link=Special:Random|alt=Random article]]
An icon whose license requires attribution may have alt text, but must keep the default link. Although public domain images do not require a link, many licenses do require one. Please see Purely decorative images for more information about licensing.
none = Means that no image is used.
blank = This parameter is now deprecated. If you see it in use, change it to "image=none".

imagewidth

Optional CSS value used to set width of image's div section. Allowing you to use images wider than the default 52px wide.
Example
imagewidth=100px

imageright

No parameter = If no imageright parameter is given then no image is shown on the right side.
An image = Should be an image with usual wiki notation. 40px - 50px width are usually about right depending on the image height to width ratio. (Images over 52 pixels width will cause padding problems, unless you also set imagerightwidth.) For example:
imageright = [[File:Nuvola apps bookcase.png|40px|alt=Three stacked books]]
Anything = Any other object that you want to show on the right side.

imagerightwidth

Optional CSS value used to set width of image's div section. Allowing you to use images wider than the default 52px wide.
Example
imagerightwidth=100px

style

Optional CSS values used by the entire message box table. Without quotation marks " " but with the ending semicolons ;. For example:
style = margin-bottom: 0.5em;

textstyle

Optional CSS values used by the text cell. For example:
textstyle = text-align: center;

text

The message body text.

The small parameters

The small article message boxes are meant for the top of sections. Normally they should only contain one or two lines of text.

small

left = Makes it a smaller left aligned message box. This also makes the default images smaller. Note that any data fed to the smallimage, smallimageright and smalltext parameters is only used if "small=left". To make it so your template also understands the small parameter you can use this code:
small = {{{small|}}}

Template loop detected: Template:Mbox Template loop detected: Template:Mbox

smallimage

No parameter = If no smallimage parameter is given then this template falls back to use the image parameter. If the image parameter also is empty then a small default image is used.
An image = Should be an image with usual wiki notation. 20px width is usually about right for boxes with one line of text, while 25px width is usually about right for boxes with two lines of text. For example:
smallimage = [[File:Gnome globe current event.svg|20px|alt=Clock over a larger globe]]
none = Means that no image is used. This overrides any image fed to image, when "small=left".

Template loop detected: Template:Mbox

smallimageright

No parameter = If no smallimageright parameter is given then this template falls back to use the imageright parameter. If the imageright parameter also is empty then no image is shown on the right side.
An image = Should be an image with usual wiki notation. 20px - 25px width is usually about right. For example:
smallimageright = [[File:Nuvola apps bookcase.png|20px|alt=Three stacked books]]
Anything = Any other object that you want to show on the right side.
none = Means that no right side image is used. This overrides any image fed to imageright, when "small=left".

Template loop detected: Template:Mbox

smalltext

A shorter version of the message body text. If no smalltext parameter is given then this template falls back to use the text parameter.

Technical details

If you need to use special characters in the text parameter then you need to escape them like this:

{{mbox
| text  = <div>
Equal sign = and a start and end brace { } work fine as they are.
But here is a pipe &#124; and two end braces <nowiki>}}</nowiki>.
And now a pipe and end braces <nowiki>|}}</nowiki>.
</div>
}}

Template loop detected: Template:Mbox

The <div> tags that surround the text in the example above are usually not needed. But if the text contains line breaks then sometimes we get weird line spacing. This especially happens when using vertical dotted lists. Then use the div tags to fix that.

This template uses CSS classes in MediaWiki:Common.css for most of its looks, thus it is fully skinnable.

This template calls Template:Tl which holds most of the code for Template:Tl, while Template:Tl itself does parameter preprocessing.

Internally this meta-template uses HTML wikimarkup instead of wikimarkup for the table code. That is the usual way we make meta-templates since wikimarkup has several drawbacks. For instance it makes it harder to use parser functions and some special characters in parameters.

The default images for this meta-template are in png format instead of svg format. The main reason is that some older web browsers have trouble with the transparent background that MediaWiki renders for svg images. The png images here have hand optimised transparent background colour so they look good in all browsers. Note that svg icons only look somewhat bad in the old browsers, thus such hand optimisation is only worth the trouble for very widely used icons.

For more technical details see the talk page and the "See also" links below.

See also

Template:Mbox templates Other pages:

</text><sha1>5cafb545bbublgg4mei08dvwxs9zay9</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Mbox templates</title><ns>10</ns><id>95150</id><revision><id>692773</id><parentid>565939</parentid><timestamp>2013-05-21T16:37:34Z</timestamp><contributor><ip>90.209.78.127</ip></contributor><text xml:space="preserve" bytes="268">Template:Nmbox</text><sha1>mm2hquqpmw1k85xftye00jkid2a0l4u</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Namespace detect</title><ns>10</ns><id>79689</id><revision><id>695915</id><parentid>497627</parentid><timestamp>2013-05-27T09:23:36Z</timestamp><contributor><ip>81.129.84.113</ip></contributor><text xml:space="preserve" bytes="1470">{{#switch:

 {{#if: 
   | {{{demospace}}}
   | {{#if: 
     | 
       {{#ifeq:|
       | talk
       |  
       }}
     | 
       {{#ifeq:template|template talk
       | talk
       | template 
       }}
     }}
   }}

| main | = | talk = | user = | project = | file | image = File:Gnome globe current event.svg | mediawiki = | template = | help = | category = | book = | extension = | other | #default =

}}</text><sha1>qry2n28n1p12gxaxgu7gs1bkzywbpqv</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Nmbox</title><ns>10</ns><id>47495</id><revision><id>556782</id><parentid>328128</parentid><timestamp>2012-06-29T10:35:15Z</timestamp><contributor><username>Krinkle</username><id>135822</id></contributor><text xml:space="preserve" bytes="587"> {{#if:File:Gnome globe current event.svg | |

}}

File:Gnome globe current event.svg image = [[File:Gnome globe current event.svg|42px|alt=Clock over a larger globe]]
imageright = [[File:Nuvola apps bookcase.svg|40px|alt=Three stacked books]]
</text><sha1>6k7jc6wiy6i7qy82dd4dw1xja6e8k5w</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Ombox</title><ns>10</ns><id>93344</id><revision><id>634878</id><parentid>634793</parentid><timestamp>2013-01-25T22:39:30Z</timestamp><contributor><username>Kaldari</username><id>31661</id></contributor><comment>reverting breakage</comment><text xml:space="preserve" bytes="723">{{#ifeq:|yes

| Template:Ombox/core | Template:Ombox/core

}}</text><sha1>p9vh00dqvq0u1q3950ueg6abd93dyrt</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Ombox/core</title><ns>10</ns><id>93345</id><revision><id>680423</id><parentid>680422</parentid><timestamp>2013-04-29T09:31:02Z</timestamp><contributor><username>Siebrand</username><id>5665</id></contributor><minor/><comment>Protected "Template:Ombox/core": Highly visible template ([Edit=Allow only autoconfirmed users] (indefinite) [Move=Allow only autoconfirmed users] (indefinite))</comment><text xml:space="preserve" bytes="2250"> {{#ifeq:File:Gnome globe current event.svg|none | | }}

{{#if:File:Nuvola apps bookcase.svg | {{#ifeq:File:Nuvola apps bookcase.svg|none

 | 
|
 }}

}}

{{#switch:

| | critical | important | warning | caution | license | speedy | delete | content | style | move | protection | notice =

| #default =
This message box is using an invalid "type=" parameter and needs fixing.
[[Category:Wikipedia message box parameter needs fixing|Template:Main otherTemplate:Mbox]]

}}</text><sha1>l3n9mp2c6ch14gekpe1oxxe8thp3xdb</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Para</title><ns>10</ns><id>40658</id><revision><id>557339</id><parentid>557338</parentid><timestamp>2012-06-30T23:27:18Z</timestamp><contributor><username>Reedy</username><id>28424</id></contributor><minor/><comment>1 revision from w:en:Template:Para</comment><text xml:space="preserve" bytes="238">|{{#if:|{{{1}}}=|}}</text><sha1>3ve3qhqjaafu9wuy6em7y1fz49qyqfx</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Purge</title><ns>10</ns><id>31341</id><revision><id>405355</id><parentid>405354</parentid><timestamp>2011-05-24T01:39:17Z</timestamp><contributor><username>Peachey88</username><id>31302</id></contributor><minor/><comment>1 revision from w:en:Template:Purge: update to en.wiki</comment><text xml:space="preserve" bytes="197">Purge</text><sha1>830osaj62tvmlh6zq374ixtzbukxcih</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Tl</title><ns>10</ns><id>12644</id><redirect title="Template:Tlx"/><revision><id>760820</id><parentid>760712</parentid><timestamp>2013-08-10T10:29:27Z</timestamp><contributor><username>IAlex</username><id>17961</id></contributor><minor/><comment>Reverted edits by 175.200.179.56 (talk) to last revision by Varnent</comment><text xml:space="preserve" bytes="25">#REDIRECTTemplate:Tlx</text><sha1>avv0qklcaxr8n5r45lcc2x17y9w78sc</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Tlx</title><ns>10</ns><id>20809</id><revision><id>557363</id><parentid>534113</parentid><timestamp>2012-06-30T23:27:22Z</timestamp><contributor><username>Reedy</username><id>28424</id></contributor><minor/><comment>1 revision from w:en:Template:Tlx</comment><text xml:space="preserve" bytes="385">{{[[Template:|]]{{#if:| |{{{2}}} }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}}</text><sha1>0d6b5bkc7j2tegvw2yzm4b6iil98xqg</sha1>

<mediawiki xsi:schemaLocation="http://www.mediawiki.org/xml/export-0.8/ http://www.mediawiki.org/xml/export-0.8.xsd" version="0.8" xml:lang="en"><siteinfo><sitename>MediaWiki</sitename><base>http://www.mediawiki.org/wiki/MediaWiki</base><generator>MediaWiki 1.22wmf12</generator><case>first-letter</case><namespaces><namespace key="-2" case="first-letter">Media</namespace><namespace key="-1" case="first-letter">Special</namespace><namespace key="0" case="first-letter"/><namespace key="1" case="first-letter">Talk</namespace><namespace key="2" case="first-letter">User</namespace><namespace key="3" case="first-letter">User talk</namespace><namespace key="4" case="first-letter">Project</namespace><namespace key="5" case="first-letter">Project talk</namespace><namespace key="6" case="first-letter">File</namespace><namespace key="7" case="first-letter">File talk</namespace><namespace key="8" case="first-letter">MediaWiki</namespace><namespace key="9" case="first-letter">MediaWiki talk</namespace><namespace key="10" case="first-letter">Template</namespace><namespace key="11" case="first-letter">Template talk</namespace><namespace key="12" case="first-letter">Help</namespace><namespace key="13" case="first-letter">Help talk</namespace><namespace key="14" case="first-letter">Category</namespace><namespace key="15" case="first-letter">Category talk</namespace><namespace key="90" case="first-letter">Thread</namespace><namespace key="91" case="first-letter">Thread talk</namespace><namespace key="92" case="first-letter">Summary</namespace><namespace key="93" case="first-letter">Summary talk</namespace><namespace key="100" case="first-letter">Manual</namespace><namespace key="101" case="first-letter">Manual talk</namespace><namespace key="102" case="first-letter">Extension</namespace><namespace key="103" case="first-letter">Extension talk</namespace><namespace key="104" case="first-letter">API</namespace><namespace key="105" case="first-letter">API talk</namespace><namespace key="106" case="first-letter">Skin</namespace><namespace key="107" case="first-letter">Skin talk</namespace><namespace key="828" case="first-letter">Module</namespace><namespace key="829" case="first-letter">Module talk</namespace><namespace key="1198" case="first-letter">Translations</namespace><namespace key="1199" case="first-letter">Translations talk</namespace><namespace key="2500" case="first-letter">VisualEditor</namespace><namespace key="2501" case="first-letter">VisualEditor talk</namespace></namespaces></siteinfo><page><title>Template:Mbox</title><ns>10</ns><id>45372</id><revision><id>634882</id><parentid>634876</parentid><timestamp>2013-01-25T22:40:38Z</timestamp><contributor><username>Kaldari</username><id>31661</id></contributor><comment>reverting self, problem was in ombox template</comment><text xml:space="preserve" bytes="707">{{

 Template:Namespace detect

| type = | image = File:Gnome globe current event.svg | imageright = File:Shuttle.svg | class = | style = | textstyle = | text = This article or section documents a current spaceflight.
Content may change as the mission progresses. | small = | smallimage = | smallimageright = | smalltext = | subst = | date = | name = }}</text><sha1>40w6e1mdq2t695t9dv143e1rzq5pv1o</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation</title><ns>10</ns><id>20803</id><revision><id>688512</id><parentid>687083</parentid><timestamp>2013-05-11T17:18:34Z</timestamp><contributor><username>Wargo</username><id>25061</id></contributor><text xml:space="preserve" bytes="2079">{{#ifeq: Mbox | sandbox

|
Template:Template sandbox notice

}}Template:Documentation/start box2 {{#switch: {{#if:|1|0}}{{#if:|1|0}}{{#ifexist:|1|0}}{{#ifexist:Template:Documentation/docspace:Template:Documentation/template page/doc|1|0}} | 1000 | 1001 | 1010 | 1011 | 1100 | 1101 | 1110 | 1111 = | 0110 | 0111 = {{ {{{1}}} }} | 0001 | 0011 = {{ Template:Documentation/docspace:Template:Documentation/template page/doc }} | 0000 | 0100 | 0010 | 0101 = }} Template:Documentation/end box2</text><sha1>bvikrz5412m4gizkphh8ftj604e3kbf</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/docspace</title><ns>10</ns><id>93323</id><revision><id>631615</id><parentid>557279</parentid><timestamp>2013-01-20T15:55:26Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><minor/><comment>1 revision from w:en:Template:Documentation/docspace: Requested by average_drifter in #mediawiki</comment><text xml:space="preserve" bytes="302">{{#switch: Template

 | 
 | File
 | MediaWiki
 | Category = Template talk
 | #default = Template
}}</text><sha1>7f8iymss9sr4v7f4t5pza1arwjogrv3</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/end box</title><ns>10</ns><id>93324</id><revision><id>631856</id><parentid>631623</parentid><timestamp>2013-01-20T16:24:41Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><text xml:space="preserve" bytes="4124">

{{#if:

 {{#ifeq:  | off
 |
 | yes{{
   #switch: Template
   | User
   | Template = yes
   }}
 }}

| Template:Fmbox }}{{#if:

 {{#switch: Mbox
 | doc
 | testcases = strange
 }}

| [[Category:Wikipedia pages with strange ((documentation)) usage|Template:Main otherTemplate:Mbox]]

}}</text><sha1>r3qht4u0hwps2mqnst3puyi8anb9dmz</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/end box2</title><ns>10</ns><id>124329</id><revision><id>688362</id><parentid>688359</parentid><timestamp>2013-05-11T09:36:55Z</timestamp><contributor><username>Shirayuki</username><id>472859</id></contributor><comment>Undo revision 688359 by Shirayuki (talk)</comment><text xml:space="preserve" bytes="864">Template:Documentation/end box</text><sha1>sfe0ppdpxp1nwfzhpym4jwdtmgpph1p</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/start box</title><ns>10</ns><id>93326</id><revision><id>742132</id><parentid>742131</parentid><timestamp>2013-07-20T14:04:29Z</timestamp><contributor><ip>81.129.86.23</ip></contributor><text xml:space="preserve" bytes="2002">

{{#ifeq: ¬ |

|

|
{{#switch: ¬
 | ¬ =   
   {{#switch: Template 
   | Template = File:Template-info.png Template documentation
   | Template:Ns:Module = File:Template-info.png Module documentation
   | File = Summary
   | #default = Documentation
   }}
 | #default = 
   
 }}{{
 #if: 
 | 
 | 
   {{
   #if: yes
   | [view] [edit] [history] [[[:Template:Purge]]] 
   | 
     [#if:  _        | %7B%7B%7Bpreload%7D%7D%7D_        | {{#ifeq: Template | File_          | Template:Documentation/preload-filespace_          | Template:Documentation/preload_          }} }} create]
   }}
}}

}}</text><sha1>linb792zr3zrp72qrhjkmqg1mz6uevr</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/start box2</title><ns>10</ns><id>93327</id><revision><id>631642</id><parentid>585737</parentid><timestamp>2013-01-20T15:55:27Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><minor/><comment>4 revisions from w:en:Template:Documentation/start box2: Requested by average_drifter in #mediawiki</comment><text xml:space="preserve" bytes="625">Template:Documentation/start box</text><sha1>t5j6y918odlsx0iuls0qgi6wbl050q3</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/template page</title><ns>10</ns><id>93328</id><revision><id>631644</id><parentid>557289</parentid><timestamp>2013-01-20T15:55:27Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><minor/><comment>1 revision from w:en:Template:Documentation/template page: Requested by average_drifter in #mediawiki</comment><text xml:space="preserve" bytes="232">{{#switch: Mbox | sandbox | testcases = Mbox | #default = Mbox }}</text><sha1>fenc3r6oe2sito28b1d8xgyo9gpq5uf</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation subpage</title><ns>10</ns><id>20806</id><revision><id>757428</id><parentid>715052</parentid><timestamp>2013-08-05T14:14:46Z</timestamp><contributor><username>IAlex</username><id>17961</id></contributor><minor/><comment>Reverted edits by 90.219.4.40 (talk) to last revision by Shirayuki</comment><text xml:space="preserve" bytes="2616">{{#if: |

File:Edit-paste.svg This is the template documentation page for Template:Mbox.
This page may not be intended to be viewed directly.
Links using variables may appear broken; do not replace these with hardcoded page names or URLs.
{{#if:x||

}} |{{#ifeq: mbox | doc

 | 

{{

   #ifeq: show | show
   | Template loop detected: Template:Mbox
   }}{{
   #if: 
   | 
   | {{#ifeq:Template|Template|}}
 }}

| }}

}}</text><sha1>7a3si8r4k2z0aqxpbbxz1c0gmny5pb9</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Fmbox</title><ns>10</ns><id>37655</id><revision><id>558796</id><parentid>558707</parentid><timestamp>2012-07-05T06:11:26Z</timestamp><contributor><username>Krinkle</username><id>135822</id></contributor><comment>update from enwiki</comment><text xml:space="preserve" bytes="1344"> {{#ifeq:File:Gnome globe current event.svg|none | | }} {{#if:File:Shuttle.svg |

}}

{{#switch:

| | warning | editnotice | system =

| #default =
This message box is using an invalid "type=" parameter and needs fixing.
[[Category:Wikipedia message box parameter needs fixing|Template:Main otherTemplate:Mbox]]

}}</text><sha1>mrldgfpkjyqf89ukmq2vy7gh3ir2j7i</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Mbox/doc</title><ns>10</ns><id>45374</id><revision><id>659649</id><parentid>651771</parentid><timestamp>2013-03-14T09:07:42Z</timestamp><contributor><username>Krinkle</username><id>135822</id></contributor><text xml:space="preserve" bytes="14176">Template:Documentation subpage This is the Template:Tl or message box meta-template.

It is used to build message box templates such as Template:Tl. It offers several different colours, uses default images if no image parameter is given and it has some other features.

This meta-template uses the mbox CSS classes in MediaWiki:Common.css. The classes can also be used directly in a wikitable if special functionality is needed. See the how-to guide for that.

Usage

Simple usage example:

{{mbox | text = Some text.}}

Template loop detected: Template:Mbox Complex example:

{{mbox
| type       = style
| small      = left
| image      = [[File:Emblem-question-yellow.svg|40px|alt=Question mark]]
| smallimage = [[File:Emblem-question-yellow.svg|20px|alt=Question mark]]
| textstyle  = color: red; font-weight: bold; font-style: italic;
| text       = Text for a big box, for the top of articles.
| smalltext  = Text for the top of article sections.
}}

Template loop detected: Template:Mbox

But you are not really supposed to use red bold italic text.

Message box types

The following examples use different type parameters but use no image parameters thus they use the default images for each type.

Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox

Other images

The default images shown above are mostly for convenience. In many cases it is more appropriate to use more specific images. These examples use the image parameter to specify an image other than the default images.

Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox

More examples

Some other parameter combinations.

Template loop detected: Template:Mbox Template loop detected: Template:Mbox

Template loop detected: Template:Mbox

Template loop detected: Template:Mbox

Parameters

List of all parameters:

{{mbox
| type  = critical / serious / warning / notice / / move / protection
| image = none / [[File:...|40px|...]]
| imagewidth = width of image section / default is 52px
| imageright = [[File:...|40px|...]]
| imagerightwidth = width of right image section / default is 52px
| style = CSS values
| textstyle = CSS values
| text  = The message body text.
| small = {{{small|}}} / left
| smallimage = none / [[File:...|20px|...]]
| smallimageright = none / [[File:...|20px|...]]
| smalltext  = A shorter message body text.
}}

type

If no type parameter is given the template has a 'blank' style.

image

No parameter = If no image parameter is given the template uses a default image. Which default image it uses depends on the type parameter.
An image = Should be an image with usual wiki notation. Widths of 40px - 50px are usually about right. (Images over 52 pixels wide will cause padding problems, unless you also set imagewidth.)
Often an icon is purely decorative in the W3C sense that it repeats the text. To improve accessibility, it is desirable to not have it be announced by screen readers, as well as to avoid it linking to an irrelevant page. If (and only if) the image license allows this, it can be marked with "Template:ParaTemplate:Para". For example:
image = [[File:Unbalanced scales.svg|40px|link=|alt=]]
Conversely, an icon that does not use "Template:ParaTemplate:Para", and which therefore is announced to visually impaired readers, should use an "Template:Para" parameter that describes the icon. With no Template:Para parameter (using the default link), the alt text should describe the icon's visual appearance. For example:
image = [[File:Gnome globe current event.svg|40px|alt=Clock over a larger globe]]
With a nonempty "Template:Para" the alt text should describe the icon's function. For example:
image = [[File:Purple question mark.svg|40px|link=Special:Random|alt=Random article]]
An icon whose license requires attribution may have alt text, but must keep the default link. Although public domain images do not require a link, many licenses do require one. Please see Purely decorative images for more information about licensing.
none = Means that no image is used.
blank = This parameter is now deprecated. If you see it in use, change it to "image=none".

imagewidth

Optional CSS value used to set width of image's div section. Allowing you to use images wider than the default 52px wide.
Example
imagewidth=100px

imageright

No parameter = If no imageright parameter is given then no image is shown on the right side.
An image = Should be an image with usual wiki notation. 40px - 50px width are usually about right depending on the image height to width ratio. (Images over 52 pixels width will cause padding problems, unless you also set imagerightwidth.) For example:
imageright = [[File:Nuvola apps bookcase.png|40px|alt=Three stacked books]]
Anything = Any other object that you want to show on the right side.

imagerightwidth

Optional CSS value used to set width of image's div section. Allowing you to use images wider than the default 52px wide.
Example
imagerightwidth=100px

style

Optional CSS values used by the entire message box table. Without quotation marks " " but with the ending semicolons ;. For example:
style = margin-bottom: 0.5em;

textstyle

Optional CSS values used by the text cell. For example:
textstyle = text-align: center;

text

The message body text.

The small parameters

The small article message boxes are meant for the top of sections. Normally they should only contain one or two lines of text.

small

left = Makes it a smaller left aligned message box. This also makes the default images smaller. Note that any data fed to the smallimage, smallimageright and smalltext parameters is only used if "small=left". To make it so your template also understands the small parameter you can use this code:
small = {{{small|}}}

Template loop detected: Template:Mbox Template loop detected: Template:Mbox

smallimage

No parameter = If no smallimage parameter is given then this template falls back to use the image parameter. If the image parameter also is empty then a small default image is used.
An image = Should be an image with usual wiki notation. 20px width is usually about right for boxes with one line of text, while 25px width is usually about right for boxes with two lines of text. For example:
smallimage = [[File:Gnome globe current event.svg|20px|alt=Clock over a larger globe]]
none = Means that no image is used. This overrides any image fed to image, when "small=left".

Template loop detected: Template:Mbox

smallimageright

No parameter = If no smallimageright parameter is given then this template falls back to use the imageright parameter. If the imageright parameter also is empty then no image is shown on the right side.
An image = Should be an image with usual wiki notation. 20px - 25px width is usually about right. For example:
smallimageright = [[File:Nuvola apps bookcase.png|20px|alt=Three stacked books]]
Anything = Any other object that you want to show on the right side.
none = Means that no right side image is used. This overrides any image fed to imageright, when "small=left".

Template loop detected: Template:Mbox

smalltext

A shorter version of the message body text. If no smalltext parameter is given then this template falls back to use the text parameter.

Technical details

If you need to use special characters in the text parameter then you need to escape them like this:

{{mbox
| text  = <div>
Equal sign = and a start and end brace { } work fine as they are.
But here is a pipe &#124; and two end braces <nowiki>}}</nowiki>.
And now a pipe and end braces <nowiki>|}}</nowiki>.
</div>
}}

Template loop detected: Template:Mbox

The <div> tags that surround the text in the example above are usually not needed. But if the text contains line breaks then sometimes we get weird line spacing. This especially happens when using vertical dotted lists. Then use the div tags to fix that.

This template uses CSS classes in MediaWiki:Common.css for most of its looks, thus it is fully skinnable.

This template calls Template:Tl which holds most of the code for Template:Tl, while Template:Tl itself does parameter preprocessing.

Internally this meta-template uses HTML wikimarkup instead of wikimarkup for the table code. That is the usual way we make meta-templates since wikimarkup has several drawbacks. For instance it makes it harder to use parser functions and some special characters in parameters.

The default images for this meta-template are in png format instead of svg format. The main reason is that some older web browsers have trouble with the transparent background that MediaWiki renders for svg images. The png images here have hand optimised transparent background colour so they look good in all browsers. Note that svg icons only look somewhat bad in the old browsers, thus such hand optimisation is only worth the trouble for very widely used icons.

For more technical details see the talk page and the "See also" links below.

See also

Template:Mbox templates Other pages:

</text><sha1>5cafb545bbublgg4mei08dvwxs9zay9</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Mbox templates</title><ns>10</ns><id>95150</id><revision><id>692773</id><parentid>565939</parentid><timestamp>2013-05-21T16:37:34Z</timestamp><contributor><ip>90.209.78.127</ip></contributor><text xml:space="preserve" bytes="268">Template:Nmbox</text><sha1>mm2hquqpmw1k85xftye00jkid2a0l4u</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Namespace detect</title><ns>10</ns><id>79689</id><revision><id>695915</id><parentid>497627</parentid><timestamp>2013-05-27T09:23:36Z</timestamp><contributor><ip>81.129.84.113</ip></contributor><text xml:space="preserve" bytes="1470">{{#switch:

 {{#if: 
   | {{{demospace}}}
   | {{#if: 
     | 
       {{#ifeq:|
       | talk
       |  
       }}
     | 
       {{#ifeq:template|template talk
       | talk
       | template 
       }}
     }}
   }}

| main | = | talk = | user = | project = | file | image = File:Gnome globe current event.svg | mediawiki = | template = | help = | category = | book = | extension = | other | #default =

}}</text><sha1>qry2n28n1p12gxaxgu7gs1bkzywbpqv</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Nmbox</title><ns>10</ns><id>47495</id><revision><id>556782</id><parentid>328128</parentid><timestamp>2012-06-29T10:35:15Z</timestamp><contributor><username>Krinkle</username><id>135822</id></contributor><text xml:space="preserve" bytes="587"> {{#if:File:Gnome globe current event.svg | |

}}

File:Gnome globe current event.svg This article or section documents a current spaceflight.
Content may change as the mission progresses.
</text><sha1>6k7jc6wiy6i7qy82dd4dw1xja6e8k5w</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Ombox</title><ns>10</ns><id>93344</id><revision><id>634878</id><parentid>634793</parentid><timestamp>2013-01-25T22:39:30Z</timestamp><contributor><username>Kaldari</username><id>31661</id></contributor><comment>reverting breakage</comment><text xml:space="preserve" bytes="723">{{#ifeq:|yes

| Template:Ombox/core | Template:Ombox/core

}}</text><sha1>p9vh00dqvq0u1q3950ueg6abd93dyrt</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Ombox/core</title><ns>10</ns><id>93345</id><revision><id>680423</id><parentid>680422</parentid><timestamp>2013-04-29T09:31:02Z</timestamp><contributor><username>Siebrand</username><id>5665</id></contributor><minor/><comment>Protected "Template:Ombox/core": Highly visible template ([Edit=Allow only autoconfirmed users] (indefinite) [Move=Allow only autoconfirmed users] (indefinite))</comment><text xml:space="preserve" bytes="2250"> {{#ifeq:File:Gnome globe current event.svg|none | | }} {{#if:File:Shuttle.svg | {{#ifeq:File:Shuttle.svg|none | |
 }}

}}

{{#switch:

| | critical | important | warning | caution | license | speedy | delete | content | style | move | protection | notice =

| #default =
This message box is using an invalid "type=" parameter and needs fixing.
[[Category:Wikipedia message box parameter needs fixing|Template:Main otherTemplate:Mbox]]

}}</text><sha1>l3n9mp2c6ch14gekpe1oxxe8thp3xdb</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Para</title><ns>10</ns><id>40658</id><revision><id>557339</id><parentid>557338</parentid><timestamp>2012-06-30T23:27:18Z</timestamp><contributor><username>Reedy</username><id>28424</id></contributor><minor/><comment>1 revision from w:en:Template:Para</comment><text xml:space="preserve" bytes="238">|{{#if:|{{{1}}}=|}}</text><sha1>3ve3qhqjaafu9wuy6em7y1fz49qyqfx</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Purge</title><ns>10</ns><id>31341</id><revision><id>405355</id><parentid>405354</parentid><timestamp>2011-05-24T01:39:17Z</timestamp><contributor><username>Peachey88</username><id>31302</id></contributor><minor/><comment>1 revision from w:en:Template:Purge: update to en.wiki</comment><text xml:space="preserve" bytes="197">Purge</text><sha1>830osaj62tvmlh6zq374ixtzbukxcih</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Tl</title><ns>10</ns><id>12644</id><redirect title="Template:Tlx"/><revision><id>760820</id><parentid>760712</parentid><timestamp>2013-08-10T10:29:27Z</timestamp><contributor><username>IAlex</username><id>17961</id></contributor><minor/><comment>Reverted edits by 175.200.179.56 (talk) to last revision by Varnent</comment><text xml:space="preserve" bytes="25">#REDIRECTTemplate:Tlx</text><sha1>avv0qklcaxr8n5r45lcc2x17y9w78sc</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Tlx</title><ns>10</ns><id>20809</id><revision><id>557363</id><parentid>534113</parentid><timestamp>2012-06-30T23:27:22Z</timestamp><contributor><username>Reedy</username><id>28424</id></contributor><minor/><comment>1 revision from w:en:Template:Tlx</comment><text xml:space="preserve" bytes="385">{{[[Template:|]]{{#if:| |{{{2}}} }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}}</text><sha1>0d6b5bkc7j2tegvw2yzm4b6iil98xqg</sha1>

Parameters

List of all parameters:

{{mbox
| type  = critical / serious / warning / notice / / move / protection
| image = none / [[File:...|40px|...]]
| imagewidth = width of image section / default is 52px
| imageright = [[File:...|40px|...]]
| imagerightwidth = width of right image section / default is 52px
| style = CSS values
| textstyle = CSS values
| text  = The message body text.
| small = {{{small|}}} / left
| smallimage = none / [[File:...|20px|...]]
| smallimageright = none / [[File:...|20px|...]]
| smalltext  = A shorter message body text.
}}

type

If no type parameter is given the template has a 'blank' style.

image

No parameter = If no image parameter is given the template uses a default image. Which default image it uses depends on the type parameter.
An image = Should be an image with usual wiki notation. Widths of 40px - 50px are usually about right. (Images over 52 pixels wide will cause padding problems, unless you also set imagewidth.)
Often an icon is purely decorative in the W3C sense that it repeats the text. To improve accessibility, it is desirable to not have it be announced by screen readers, as well as to avoid it linking to an irrelevant page. If (and only if) the image license allows this, it can be marked with "Template:ParaTemplate:Para". For example:
image = [[File:Unbalanced scales.svg|40px|link=|alt=]]
Conversely, an icon that does not use "Template:ParaTemplate:Para", and which therefore is announced to visually impaired readers, should use an "Template:Para" parameter that describes the icon. With no Template:Para parameter (using the default link), the alt text should describe the icon's visual appearance. For example:
image = [[File:Gnome globe current event.svg|40px|alt=Clock over a larger globe]]
With a nonempty "Template:Para" the alt text should describe the icon's function. For example:
image = [[File:Purple question mark.svg|40px|link=Special:Random|alt=Random article]]
An icon whose license requires attribution may have alt text, but must keep the default link. Although public domain images do not require a link, many licenses do require one. Please see Purely decorative images for more information about licensing.
none = Means that no image is used.
blank = This parameter is now deprecated. If you see it in use, change it to "image=none".

imagewidth

Optional CSS value used to set width of image's div section. Allowing you to use images wider than the default 52px wide.
Example
imagewidth=100px

imageright

No parameter = If no imageright parameter is given then no image is shown on the right side.
An image = Should be an image with usual wiki notation. 40px - 50px width are usually about right depending on the image height to width ratio. (Images over 52 pixels width will cause padding problems, unless you also set imagerightwidth.) For example:
imageright = [[File:Nuvola apps bookcase.png|40px|alt=Three stacked books]]
Anything = Any other object that you want to show on the right side.

imagerightwidth

Optional CSS value used to set width of image's div section. Allowing you to use images wider than the default 52px wide.
Example
imagerightwidth=100px

style

Optional CSS values used by the entire message box table. Without quotation marks " " but with the ending semicolons ;. For example:
style = margin-bottom: 0.5em;

textstyle

Optional CSS values used by the text cell. For example:
textstyle = text-align: center;

text

The message body text.

The small parameters

The small article message boxes are meant for the top of sections. Normally they should only contain one or two lines of text.

small

left = Makes it a smaller left aligned message box. This also makes the default images smaller. Note that any data fed to the smallimage, smallimageright and smalltext parameters is only used if "small=left". To make it so your template also understands the small parameter you can use this code:
small = {{{small|}}}

<mediawiki xsi:schemaLocation="http://www.mediawiki.org/xml/export-0.8/ http://www.mediawiki.org/xml/export-0.8.xsd" version="0.8" xml:lang="en"><siteinfo><sitename>MediaWiki</sitename><base>http://www.mediawiki.org/wiki/MediaWiki</base><generator>MediaWiki 1.22wmf12</generator><case>first-letter</case><namespaces><namespace key="-2" case="first-letter">Media</namespace><namespace key="-1" case="first-letter">Special</namespace><namespace key="0" case="first-letter"/><namespace key="1" case="first-letter">Talk</namespace><namespace key="2" case="first-letter">User</namespace><namespace key="3" case="first-letter">User talk</namespace><namespace key="4" case="first-letter">Project</namespace><namespace key="5" case="first-letter">Project talk</namespace><namespace key="6" case="first-letter">File</namespace><namespace key="7" case="first-letter">File talk</namespace><namespace key="8" case="first-letter">MediaWiki</namespace><namespace key="9" case="first-letter">MediaWiki talk</namespace><namespace key="10" case="first-letter">Template</namespace><namespace key="11" case="first-letter">Template talk</namespace><namespace key="12" case="first-letter">Help</namespace><namespace key="13" case="first-letter">Help talk</namespace><namespace key="14" case="first-letter">Category</namespace><namespace key="15" case="first-letter">Category talk</namespace><namespace key="90" case="first-letter">Thread</namespace><namespace key="91" case="first-letter">Thread talk</namespace><namespace key="92" case="first-letter">Summary</namespace><namespace key="93" case="first-letter">Summary talk</namespace><namespace key="100" case="first-letter">Manual</namespace><namespace key="101" case="first-letter">Manual talk</namespace><namespace key="102" case="first-letter">Extension</namespace><namespace key="103" case="first-letter">Extension talk</namespace><namespace key="104" case="first-letter">API</namespace><namespace key="105" case="first-letter">API talk</namespace><namespace key="106" case="first-letter">Skin</namespace><namespace key="107" case="first-letter">Skin talk</namespace><namespace key="828" case="first-letter">Module</namespace><namespace key="829" case="first-letter">Module talk</namespace><namespace key="1198" case="first-letter">Translations</namespace><namespace key="1199" case="first-letter">Translations talk</namespace><namespace key="2500" case="first-letter">VisualEditor</namespace><namespace key="2501" case="first-letter">VisualEditor talk</namespace></namespaces></siteinfo><page><title>Template:Mbox</title><ns>10</ns><id>45372</id><revision><id>634882</id><parentid>634876</parentid><timestamp>2013-01-25T22:40:38Z</timestamp><contributor><username>Kaldari</username><id>31661</id></contributor><comment>reverting self, problem was in ombox template</comment><text xml:space="preserve" bytes="707">{{

 Template:Namespace detect

| type = | image = | imageright = | class = | style = | textstyle = | text = small = left | small = left | smallimage = | smallimageright = | smalltext = | subst = | date = | name = }}</text><sha1>40w6e1mdq2t695t9dv143e1rzq5pv1o</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation</title><ns>10</ns><id>20803</id><revision><id>688512</id><parentid>687083</parentid><timestamp>2013-05-11T17:18:34Z</timestamp><contributor><username>Wargo</username><id>25061</id></contributor><text xml:space="preserve" bytes="2079">{{#ifeq: Mbox | sandbox

|
Template:Template sandbox notice

}}Template:Documentation/start box2 {{#switch: {{#if:|1|0}}{{#if:|1|0}}{{#ifexist:|1|0}}{{#ifexist:Template:Documentation/docspace:Template:Documentation/template page/doc|1|0}} | 1000 | 1001 | 1010 | 1011 | 1100 | 1101 | 1110 | 1111 = | 0110 | 0111 = {{ {{{1}}} }} | 0001 | 0011 = {{ Template:Documentation/docspace:Template:Documentation/template page/doc }} | 0000 | 0100 | 0010 | 0101 = }} Template:Documentation/end box2</text><sha1>bvikrz5412m4gizkphh8ftj604e3kbf</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/docspace</title><ns>10</ns><id>93323</id><revision><id>631615</id><parentid>557279</parentid><timestamp>2013-01-20T15:55:26Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><minor/><comment>1 revision from w:en:Template:Documentation/docspace: Requested by average_drifter in #mediawiki</comment><text xml:space="preserve" bytes="302">{{#switch: Template

 | 
 | File
 | MediaWiki
 | Category = Template talk
 | #default = Template
}}</text><sha1>7f8iymss9sr4v7f4t5pza1arwjogrv3</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/end box</title><ns>10</ns><id>93324</id><revision><id>631856</id><parentid>631623</parentid><timestamp>2013-01-20T16:24:41Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><text xml:space="preserve" bytes="4124">

{{#if:

 {{#ifeq:  | off
 |
 | yes{{
   #switch: Template
   | User
   | Template = yes
   }}
 }}

| Template:Fmbox }}{{#if:

 {{#switch: Mbox
 | doc
 | testcases = strange
 }}

| [[Category:Wikipedia pages with strange ((documentation)) usage|Template:Main otherTemplate:Mbox]]

}}</text><sha1>r3qht4u0hwps2mqnst3puyi8anb9dmz</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/end box2</title><ns>10</ns><id>124329</id><revision><id>688362</id><parentid>688359</parentid><timestamp>2013-05-11T09:36:55Z</timestamp><contributor><username>Shirayuki</username><id>472859</id></contributor><comment>Undo revision 688359 by Shirayuki (talk)</comment><text xml:space="preserve" bytes="864">Template:Documentation/end box</text><sha1>sfe0ppdpxp1nwfzhpym4jwdtmgpph1p</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/start box</title><ns>10</ns><id>93326</id><revision><id>742132</id><parentid>742131</parentid><timestamp>2013-07-20T14:04:29Z</timestamp><contributor><ip>81.129.86.23</ip></contributor><text xml:space="preserve" bytes="2002">

{{#ifeq: ¬ |

|

|
{{#switch: ¬
 | ¬ =   
   {{#switch: Template 
   | Template = File:Template-info.png Template documentation
   | Template:Ns:Module = File:Template-info.png Module documentation
   | File = Summary
   | #default = Documentation
   }}
 | #default = 
   
 }}{{
 #if: 
 | 
 | 
   {{
   #if: yes
   | [view] [edit] [history] [[[:Template:Purge]]] 
   | 
     [#if:  _        | %7B%7B%7Bpreload%7D%7D%7D_        | {{#ifeq: Template | File_          | Template:Documentation/preload-filespace_          | Template:Documentation/preload_          }} }} create]
   }}
}}

}}</text><sha1>linb792zr3zrp72qrhjkmqg1mz6uevr</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/start box2</title><ns>10</ns><id>93327</id><revision><id>631642</id><parentid>585737</parentid><timestamp>2013-01-20T15:55:27Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><minor/><comment>4 revisions from w:en:Template:Documentation/start box2: Requested by average_drifter in #mediawiki</comment><text xml:space="preserve" bytes="625">Template:Documentation/start box</text><sha1>t5j6y918odlsx0iuls0qgi6wbl050q3</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/template page</title><ns>10</ns><id>93328</id><revision><id>631644</id><parentid>557289</parentid><timestamp>2013-01-20T15:55:27Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><minor/><comment>1 revision from w:en:Template:Documentation/template page: Requested by average_drifter in #mediawiki</comment><text xml:space="preserve" bytes="232">{{#switch: Mbox | sandbox | testcases = Mbox | #default = Mbox }}</text><sha1>fenc3r6oe2sito28b1d8xgyo9gpq5uf</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation subpage</title><ns>10</ns><id>20806</id><revision><id>757428</id><parentid>715052</parentid><timestamp>2013-08-05T14:14:46Z</timestamp><contributor><username>IAlex</username><id>17961</id></contributor><minor/><comment>Reverted edits by 90.219.4.40 (talk) to last revision by Shirayuki</comment><text xml:space="preserve" bytes="2616">{{#if: |

File:Edit-paste.svg This is the template documentation page for Template:Mbox.
This page may not be intended to be viewed directly.
Links using variables may appear broken; do not replace these with hardcoded page names or URLs.
{{#if:x||

}} |{{#ifeq: mbox | doc

 | 

{{

   #ifeq: show | show
   | Template loop detected: Template:Mbox
   }}{{
   #if: 
   | 
   | {{#ifeq:Template|Template|}}
 }}

| }}

}}</text><sha1>7a3si8r4k2z0aqxpbbxz1c0gmny5pb9</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Fmbox</title><ns>10</ns><id>37655</id><revision><id>558796</id><parentid>558707</parentid><timestamp>2012-07-05T06:11:26Z</timestamp><contributor><username>Krinkle</username><id>135822</id></contributor><comment>update from enwiki</comment><text xml:space="preserve" bytes="1344"> {{#ifeq:|none | | }}

{{#if:

|

}}

{{#switch:

| | warning | editnotice | system =

| #default =
This message box is using an invalid "type=" parameter and needs fixing.
[[Category:Wikipedia message box parameter needs fixing|Template:Main otherTemplate:Mbox]]

}}</text><sha1>mrldgfpkjyqf89ukmq2vy7gh3ir2j7i</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Mbox/doc</title><ns>10</ns><id>45374</id><revision><id>659649</id><parentid>651771</parentid><timestamp>2013-03-14T09:07:42Z</timestamp><contributor><username>Krinkle</username><id>135822</id></contributor><text xml:space="preserve" bytes="14176">Template:Documentation subpage This is the Template:Tl or message box meta-template.

It is used to build message box templates such as Template:Tl. It offers several different colours, uses default images if no image parameter is given and it has some other features.

This meta-template uses the mbox CSS classes in MediaWiki:Common.css. The classes can also be used directly in a wikitable if special functionality is needed. See the how-to guide for that.

Usage

Simple usage example:

{{mbox | text = Some text.}}

Template loop detected: Template:Mbox Complex example:

{{mbox
| type       = style
| small      = left
| image      = [[File:Emblem-question-yellow.svg|40px|alt=Question mark]]
| smallimage = [[File:Emblem-question-yellow.svg|20px|alt=Question mark]]
| textstyle  = color: red; font-weight: bold; font-style: italic;
| text       = Text for a big box, for the top of articles.
| smalltext  = Text for the top of article sections.
}}

Template loop detected: Template:Mbox

But you are not really supposed to use red bold italic text.

Message box types

The following examples use different type parameters but use no image parameters thus they use the default images for each type.

Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox

Other images

The default images shown above are mostly for convenience. In many cases it is more appropriate to use more specific images. These examples use the image parameter to specify an image other than the default images.

Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox

More examples

Some other parameter combinations.

Template loop detected: Template:Mbox Template loop detected: Template:Mbox

Template loop detected: Template:Mbox

Template loop detected: Template:Mbox

Parameters

List of all parameters:

{{mbox
| type  = critical / serious / warning / notice / / move / protection
| image = none / [[File:...|40px|...]]
| imagewidth = width of image section / default is 52px
| imageright = [[File:...|40px|...]]
| imagerightwidth = width of right image section / default is 52px
| style = CSS values
| textstyle = CSS values
| text  = The message body text.
| small = {{{small|}}} / left
| smallimage = none / [[File:...|20px|...]]
| smallimageright = none / [[File:...|20px|...]]
| smalltext  = A shorter message body text.
}}

type

If no type parameter is given the template has a 'blank' style.

image

No parameter = If no image parameter is given the template uses a default image. Which default image it uses depends on the type parameter.
An image = Should be an image with usual wiki notation. Widths of 40px - 50px are usually about right. (Images over 52 pixels wide will cause padding problems, unless you also set imagewidth.)
Often an icon is purely decorative in the W3C sense that it repeats the text. To improve accessibility, it is desirable to not have it be announced by screen readers, as well as to avoid it linking to an irrelevant page. If (and only if) the image license allows this, it can be marked with "Template:ParaTemplate:Para". For example:
image = [[File:Unbalanced scales.svg|40px|link=|alt=]]
Conversely, an icon that does not use "Template:ParaTemplate:Para", and which therefore is announced to visually impaired readers, should use an "Template:Para" parameter that describes the icon. With no Template:Para parameter (using the default link), the alt text should describe the icon's visual appearance. For example:
image = [[File:Gnome globe current event.svg|40px|alt=Clock over a larger globe]]
With a nonempty "Template:Para" the alt text should describe the icon's function. For example:
image = [[File:Purple question mark.svg|40px|link=Special:Random|alt=Random article]]
An icon whose license requires attribution may have alt text, but must keep the default link. Although public domain images do not require a link, many licenses do require one. Please see Purely decorative images for more information about licensing.
none = Means that no image is used.
blank = This parameter is now deprecated. If you see it in use, change it to "image=none".

imagewidth

Optional CSS value used to set width of image's div section. Allowing you to use images wider than the default 52px wide.
Example
imagewidth=100px

imageright

No parameter = If no imageright parameter is given then no image is shown on the right side.
An image = Should be an image with usual wiki notation. 40px - 50px width are usually about right depending on the image height to width ratio. (Images over 52 pixels width will cause padding problems, unless you also set imagerightwidth.) For example:
imageright = [[File:Nuvola apps bookcase.png|40px|alt=Three stacked books]]
Anything = Any other object that you want to show on the right side.

imagerightwidth

Optional CSS value used to set width of image's div section. Allowing you to use images wider than the default 52px wide.
Example
imagerightwidth=100px

style

Optional CSS values used by the entire message box table. Without quotation marks " " but with the ending semicolons ;. For example:
style = margin-bottom: 0.5em;

textstyle

Optional CSS values used by the text cell. For example:
textstyle = text-align: center;

text

The message body text.

The small parameters

The small article message boxes are meant for the top of sections. Normally they should only contain one or two lines of text.

small

left = Makes it a smaller left aligned message box. This also makes the default images smaller. Note that any data fed to the smallimage, smallimageright and smalltext parameters is only used if "small=left". To make it so your template also understands the small parameter you can use this code:
small = {{{small|}}}

Template loop detected: Template:Mbox Template loop detected: Template:Mbox

smallimage

No parameter = If no smallimage parameter is given then this template falls back to use the image parameter. If the image parameter also is empty then a small default image is used.
An image = Should be an image with usual wiki notation. 20px width is usually about right for boxes with one line of text, while 25px width is usually about right for boxes with two lines of text. For example:
smallimage = [[File:Gnome globe current event.svg|20px|alt=Clock over a larger globe]]
none = Means that no image is used. This overrides any image fed to image, when "small=left".

Template loop detected: Template:Mbox

smallimageright

No parameter = If no smallimageright parameter is given then this template falls back to use the imageright parameter. If the imageright parameter also is empty then no image is shown on the right side.
An image = Should be an image with usual wiki notation. 20px - 25px width is usually about right. For example:
smallimageright = [[File:Nuvola apps bookcase.png|20px|alt=Three stacked books]]
Anything = Any other object that you want to show on the right side.
none = Means that no right side image is used. This overrides any image fed to imageright, when "small=left".

Template loop detected: Template:Mbox

smalltext

A shorter version of the message body text. If no smalltext parameter is given then this template falls back to use the text parameter.

Technical details

If you need to use special characters in the text parameter then you need to escape them like this:

{{mbox
| text  = <div>
Equal sign = and a start and end brace { } work fine as they are.
But here is a pipe &#124; and two end braces <nowiki>}}</nowiki>.
And now a pipe and end braces <nowiki>|}}</nowiki>.
</div>
}}

Template loop detected: Template:Mbox

The <div> tags that surround the text in the example above are usually not needed. But if the text contains line breaks then sometimes we get weird line spacing. This especially happens when using vertical dotted lists. Then use the div tags to fix that.

This template uses CSS classes in MediaWiki:Common.css for most of its looks, thus it is fully skinnable.

This template calls Template:Tl which holds most of the code for Template:Tl, while Template:Tl itself does parameter preprocessing.

Internally this meta-template uses HTML wikimarkup instead of wikimarkup for the table code. That is the usual way we make meta-templates since wikimarkup has several drawbacks. For instance it makes it harder to use parser functions and some special characters in parameters.

The default images for this meta-template are in png format instead of svg format. The main reason is that some older web browsers have trouble with the transparent background that MediaWiki renders for svg images. The png images here have hand optimised transparent background colour so they look good in all browsers. Note that svg icons only look somewhat bad in the old browsers, thus such hand optimisation is only worth the trouble for very widely used icons.

For more technical details see the talk page and the "See also" links below.

See also

Template:Mbox templates Other pages:

</text><sha1>5cafb545bbublgg4mei08dvwxs9zay9</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Mbox templates</title><ns>10</ns><id>95150</id><revision><id>692773</id><parentid>565939</parentid><timestamp>2013-05-21T16:37:34Z</timestamp><contributor><ip>90.209.78.127</ip></contributor><text xml:space="preserve" bytes="268">Template:Nmbox</text><sha1>mm2hquqpmw1k85xftye00jkid2a0l4u</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Namespace detect</title><ns>10</ns><id>79689</id><revision><id>695915</id><parentid>497627</parentid><timestamp>2013-05-27T09:23:36Z</timestamp><contributor><ip>81.129.84.113</ip></contributor><text xml:space="preserve" bytes="1470">{{#switch:

 {{#if: 
   | {{{demospace}}}
   | {{#if: 
     | 
       {{#ifeq:|
       | talk
       |  
       }}
     | 
       {{#ifeq:template|template talk
       | talk
       | template 
       }}
     }}
   }}

| main | = | talk = | user = | project = | file | image = | mediawiki = | template = | help = | category = | book = | extension = | other | #default =

}}</text><sha1>qry2n28n1p12gxaxgu7gs1bkzywbpqv</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Nmbox</title><ns>10</ns><id>47495</id><revision><id>556782</id><parentid>328128</parentid><timestamp>2012-06-29T10:35:15Z</timestamp><contributor><username>Krinkle</username><id>135822</id></contributor><text xml:space="preserve" bytes="587"> {{#if: | |

}}

small = left
</text><sha1>6k7jc6wiy6i7qy82dd4dw1xja6e8k5w</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Ombox</title><ns>10</ns><id>93344</id><revision><id>634878</id><parentid>634793</parentid><timestamp>2013-01-25T22:39:30Z</timestamp><contributor><username>Kaldari</username><id>31661</id></contributor><comment>reverting breakage</comment><text xml:space="preserve" bytes="723">{{#ifeq:left|yes

| Template:Ombox/core | Template:Ombox/core

}}</text><sha1>p9vh00dqvq0u1q3950ueg6abd93dyrt</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Ombox/core</title><ns>10</ns><id>93345</id><revision><id>680423</id><parentid>680422</parentid><timestamp>2013-04-29T09:31:02Z</timestamp><contributor><username>Siebrand</username><id>5665</id></contributor><minor/><comment>Protected "Template:Ombox/core": Highly visible template ([Edit=Allow only autoconfirmed users] (indefinite) [Move=Allow only autoconfirmed users] (indefinite))</comment><text xml:space="preserve" bytes="2250"> {{#ifeq:|none | | }}

{{#if: | {{#ifeq:|none

 | 
|
 }}

}}

{{#switch:

| | critical | important | warning | caution | license | speedy | delete | content | style | move | protection | notice =

| #default =
This message box is using an invalid "type=" parameter and needs fixing.
[[Category:Wikipedia message box parameter needs fixing|Template:Main otherTemplate:Mbox]]

}}</text><sha1>l3n9mp2c6ch14gekpe1oxxe8thp3xdb</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Para</title><ns>10</ns><id>40658</id><revision><id>557339</id><parentid>557338</parentid><timestamp>2012-06-30T23:27:18Z</timestamp><contributor><username>Reedy</username><id>28424</id></contributor><minor/><comment>1 revision from w:en:Template:Para</comment><text xml:space="preserve" bytes="238">|{{#if:|{{{1}}}=|}}</text><sha1>3ve3qhqjaafu9wuy6em7y1fz49qyqfx</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Purge</title><ns>10</ns><id>31341</id><revision><id>405355</id><parentid>405354</parentid><timestamp>2011-05-24T01:39:17Z</timestamp><contributor><username>Peachey88</username><id>31302</id></contributor><minor/><comment>1 revision from w:en:Template:Purge: update to en.wiki</comment><text xml:space="preserve" bytes="197">Purge</text><sha1>830osaj62tvmlh6zq374ixtzbukxcih</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Tl</title><ns>10</ns><id>12644</id><redirect title="Template:Tlx"/><revision><id>760820</id><parentid>760712</parentid><timestamp>2013-08-10T10:29:27Z</timestamp><contributor><username>IAlex</username><id>17961</id></contributor><minor/><comment>Reverted edits by 175.200.179.56 (talk) to last revision by Varnent</comment><text xml:space="preserve" bytes="25">#REDIRECTTemplate:Tlx</text><sha1>avv0qklcaxr8n5r45lcc2x17y9w78sc</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Tlx</title><ns>10</ns><id>20809</id><revision><id>557363</id><parentid>534113</parentid><timestamp>2012-06-30T23:27:22Z</timestamp><contributor><username>Reedy</username><id>28424</id></contributor><minor/><comment>1 revision from w:en:Template:Tlx</comment><text xml:space="preserve" bytes="385">{{[[Template:|]]{{#if:| |{{{2}}} }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}}</text><sha1>0d6b5bkc7j2tegvw2yzm4b6iil98xqg</sha1> <mediawiki xsi:schemaLocation="http://www.mediawiki.org/xml/export-0.8/ http://www.mediawiki.org/xml/export-0.8.xsd" version="0.8" xml:lang="en"><siteinfo><sitename>MediaWiki</sitename><base>http://www.mediawiki.org/wiki/MediaWiki</base><generator>MediaWiki 1.22wmf12</generator><case>first-letter</case><namespaces><namespace key="-2" case="first-letter">Media</namespace><namespace key="-1" case="first-letter">Special</namespace><namespace key="0" case="first-letter"/><namespace key="1" case="first-letter">Talk</namespace><namespace key="2" case="first-letter">User</namespace><namespace key="3" case="first-letter">User talk</namespace><namespace key="4" case="first-letter">Project</namespace><namespace key="5" case="first-letter">Project talk</namespace><namespace key="6" case="first-letter">File</namespace><namespace key="7" case="first-letter">File talk</namespace><namespace key="8" case="first-letter">MediaWiki</namespace><namespace key="9" case="first-letter">MediaWiki talk</namespace><namespace key="10" case="first-letter">Template</namespace><namespace key="11" case="first-letter">Template talk</namespace><namespace key="12" case="first-letter">Help</namespace><namespace key="13" case="first-letter">Help talk</namespace><namespace key="14" case="first-letter">Category</namespace><namespace key="15" case="first-letter">Category talk</namespace><namespace key="90" case="first-letter">Thread</namespace><namespace key="91" case="first-letter">Thread talk</namespace><namespace key="92" case="first-letter">Summary</namespace><namespace key="93" case="first-letter">Summary talk</namespace><namespace key="100" case="first-letter">Manual</namespace><namespace key="101" case="first-letter">Manual talk</namespace><namespace key="102" case="first-letter">Extension</namespace><namespace key="103" case="first-letter">Extension talk</namespace><namespace key="104" case="first-letter">API</namespace><namespace key="105" case="first-letter">API talk</namespace><namespace key="106" case="first-letter">Skin</namespace><namespace key="107" case="first-letter">Skin talk</namespace><namespace key="828" case="first-letter">Module</namespace><namespace key="829" case="first-letter">Module talk</namespace><namespace key="1198" case="first-letter">Translations</namespace><namespace key="1199" case="first-letter">Translations talk</namespace><namespace key="2500" case="first-letter">VisualEditor</namespace><namespace key="2501" case="first-letter">VisualEditor talk</namespace></namespaces></siteinfo><page><title>Template:Mbox</title><ns>10</ns><id>45372</id><revision><id>634882</id><parentid>634876</parentid><timestamp>2013-01-25T22:40:38Z</timestamp><contributor><username>Kaldari</username><id>31661</id></contributor><comment>reverting self, problem was in ombox template</comment><text xml:space="preserve" bytes="707">{{

 Template:Namespace detect

| type = style | image = | imageright = | class = | style = | textstyle = | text = type = style
small = left | small = left | smallimage = | smallimageright = | smalltext = | subst = | date = | name = }}</text><sha1>40w6e1mdq2t695t9dv143e1rzq5pv1o</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation</title><ns>10</ns><id>20803</id><revision><id>688512</id><parentid>687083</parentid><timestamp>2013-05-11T17:18:34Z</timestamp><contributor><username>Wargo</username><id>25061</id></contributor><text xml:space="preserve" bytes="2079">{{#ifeq: Mbox | sandbox

|
Template:Template sandbox notice

}}Template:Documentation/start box2 {{#switch: {{#if:|1|0}}{{#if:|1|0}}{{#ifexist:|1|0}}{{#ifexist:Template:Documentation/docspace:Template:Documentation/template page/doc|1|0}} | 1000 | 1001 | 1010 | 1011 | 1100 | 1101 | 1110 | 1111 = | 0110 | 0111 = {{ {{{1}}} }} | 0001 | 0011 = {{ Template:Documentation/docspace:Template:Documentation/template page/doc }} | 0000 | 0100 | 0010 | 0101 = }} Template:Documentation/end box2</text><sha1>bvikrz5412m4gizkphh8ftj604e3kbf</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/docspace</title><ns>10</ns><id>93323</id><revision><id>631615</id><parentid>557279</parentid><timestamp>2013-01-20T15:55:26Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><minor/><comment>1 revision from w:en:Template:Documentation/docspace: Requested by average_drifter in #mediawiki</comment><text xml:space="preserve" bytes="302">{{#switch: Template

 | 
 | File
 | MediaWiki
 | Category = Template talk
 | #default = Template
}}</text><sha1>7f8iymss9sr4v7f4t5pza1arwjogrv3</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/end box</title><ns>10</ns><id>93324</id><revision><id>631856</id><parentid>631623</parentid><timestamp>2013-01-20T16:24:41Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><text xml:space="preserve" bytes="4124">

{{#if:

 {{#ifeq:  | off
 |
 | yes{{
   #switch: Template
   | User
   | Template = yes
   }}
 }}

| Template:Fmbox }}{{#if:

 {{#switch: Mbox
 | doc
 | testcases = strange
 }}

| [[Category:Wikipedia pages with strange ((documentation)) usage|Template:Main otherTemplate:Mbox]]

}}</text><sha1>r3qht4u0hwps2mqnst3puyi8anb9dmz</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/end box2</title><ns>10</ns><id>124329</id><revision><id>688362</id><parentid>688359</parentid><timestamp>2013-05-11T09:36:55Z</timestamp><contributor><username>Shirayuki</username><id>472859</id></contributor><comment>Undo revision 688359 by Shirayuki (talk)</comment><text xml:space="preserve" bytes="864">Template:Documentation/end box</text><sha1>sfe0ppdpxp1nwfzhpym4jwdtmgpph1p</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/start box</title><ns>10</ns><id>93326</id><revision><id>742132</id><parentid>742131</parentid><timestamp>2013-07-20T14:04:29Z</timestamp><contributor><ip>81.129.86.23</ip></contributor><text xml:space="preserve" bytes="2002">

{{#ifeq: ¬ |

|

|
{{#switch: ¬
 | ¬ =   
   {{#switch: Template 
   | Template = File:Template-info.png Template documentation
   | Template:Ns:Module = File:Template-info.png Module documentation
   | File = Summary
   | #default = Documentation
   }}
 | #default = 
   
 }}{{
 #if: 
 | 
 | 
   {{
   #if: yes
   | [view] [edit] [history] [[[:Template:Purge]]] 
   | 
     [#if:  _        | %7B%7B%7Bpreload%7D%7D%7D_        | {{#ifeq: Template | File_          | Template:Documentation/preload-filespace_          | Template:Documentation/preload_          }} }} create]
   }}
}}

}}</text><sha1>linb792zr3zrp72qrhjkmqg1mz6uevr</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/start box2</title><ns>10</ns><id>93327</id><revision><id>631642</id><parentid>585737</parentid><timestamp>2013-01-20T15:55:27Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><minor/><comment>4 revisions from w:en:Template:Documentation/start box2: Requested by average_drifter in #mediawiki</comment><text xml:space="preserve" bytes="625">Template:Documentation/start box</text><sha1>t5j6y918odlsx0iuls0qgi6wbl050q3</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/template page</title><ns>10</ns><id>93328</id><revision><id>631644</id><parentid>557289</parentid><timestamp>2013-01-20T15:55:27Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><minor/><comment>1 revision from w:en:Template:Documentation/template page: Requested by average_drifter in #mediawiki</comment><text xml:space="preserve" bytes="232">{{#switch: Mbox | sandbox | testcases = Mbox | #default = Mbox }}</text><sha1>fenc3r6oe2sito28b1d8xgyo9gpq5uf</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation subpage</title><ns>10</ns><id>20806</id><revision><id>757428</id><parentid>715052</parentid><timestamp>2013-08-05T14:14:46Z</timestamp><contributor><username>IAlex</username><id>17961</id></contributor><minor/><comment>Reverted edits by 90.219.4.40 (talk) to last revision by Shirayuki</comment><text xml:space="preserve" bytes="2616">{{#if: |

File:Edit-paste.svg This is the template documentation page for Template:Mbox.
This page may not be intended to be viewed directly.
Links using variables may appear broken; do not replace these with hardcoded page names or URLs.
{{#if:x||

}} |{{#ifeq: mbox | doc

 | 

{{

   #ifeq: show | show
   | Template loop detected: Template:Mbox
   }}{{
   #if: 
   | 
   | {{#ifeq:Template|Template|}}
 }}

| }}

}}</text><sha1>7a3si8r4k2z0aqxpbbxz1c0gmny5pb9</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Fmbox</title><ns>10</ns><id>37655</id><revision><id>558796</id><parentid>558707</parentid><timestamp>2012-07-05T06:11:26Z</timestamp><contributor><username>Krinkle</username><id>135822</id></contributor><comment>update from enwiki</comment><text xml:space="preserve" bytes="1344"> {{#ifeq:|none | | }}

{{#if:

|

}}

{{#switch:style

| | warning | editnotice | system =

| #default =
This message box is using an invalid "type=style" parameter and needs fixing.
[[Category:Wikipedia message box parameter needs fixing|Template:Main otherTemplate:Mbox]]

}}</text><sha1>mrldgfpkjyqf89ukmq2vy7gh3ir2j7i</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Mbox/doc</title><ns>10</ns><id>45374</id><revision><id>659649</id><parentid>651771</parentid><timestamp>2013-03-14T09:07:42Z</timestamp><contributor><username>Krinkle</username><id>135822</id></contributor><text xml:space="preserve" bytes="14176">Template:Documentation subpage This is the Template:Tl or message box meta-template.

It is used to build message box templates such as Template:Tl. It offers several different colours, uses default images if no image parameter is given and it has some other features.

This meta-template uses the mbox CSS classes in MediaWiki:Common.css. The classes can also be used directly in a wikitable if special functionality is needed. See the how-to guide for that.

Usage

Simple usage example:

{{mbox | text = Some text.}}

Template loop detected: Template:Mbox Complex example:

{{mbox
| type       = style
| small      = left
| image      = [[File:Emblem-question-yellow.svg|40px|alt=Question mark]]
| smallimage = [[File:Emblem-question-yellow.svg|20px|alt=Question mark]]
| textstyle  = color: red; font-weight: bold; font-style: italic;
| text       = Text for a big box, for the top of articles.
| smalltext  = Text for the top of article sections.
}}

Template loop detected: Template:Mbox

But you are not really supposed to use red bold italic text.

Message box types

The following examples use different type parameters but use no image parameters thus they use the default images for each type.

Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox

Other images

The default images shown above are mostly for convenience. In many cases it is more appropriate to use more specific images. These examples use the image parameter to specify an image other than the default images.

Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox

More examples

Some other parameter combinations.

Template loop detected: Template:Mbox Template loop detected: Template:Mbox

Template loop detected: Template:Mbox

Template loop detected: Template:Mbox

Parameters

List of all parameters:

{{mbox
| type  = critical / serious / warning / notice / / move / protection
| image = none / [[File:...|40px|...]]
| imagewidth = width of image section / default is 52px
| imageright = [[File:...|40px|...]]
| imagerightwidth = width of right image section / default is 52px
| style = CSS values
| textstyle = CSS values
| text  = The message body text.
| small = {{{small|}}} / left
| smallimage = none / [[File:...|20px|...]]
| smallimageright = none / [[File:...|20px|...]]
| smalltext  = A shorter message body text.
}}

type

If no type parameter is given the template has a 'blank' style.

image

No parameter = If no image parameter is given the template uses a default image. Which default image it uses depends on the type parameter.
An image = Should be an image with usual wiki notation. Widths of 40px - 50px are usually about right. (Images over 52 pixels wide will cause padding problems, unless you also set imagewidth.)
Often an icon is purely decorative in the W3C sense that it repeats the text. To improve accessibility, it is desirable to not have it be announced by screen readers, as well as to avoid it linking to an irrelevant page. If (and only if) the image license allows this, it can be marked with "Template:ParaTemplate:Para". For example:
image = [[File:Unbalanced scales.svg|40px|link=|alt=]]
Conversely, an icon that does not use "Template:ParaTemplate:Para", and which therefore is announced to visually impaired readers, should use an "Template:Para" parameter that describes the icon. With no Template:Para parameter (using the default link), the alt text should describe the icon's visual appearance. For example:
image = [[File:Gnome globe current event.svg|40px|alt=Clock over a larger globe]]
With a nonempty "Template:Para" the alt text should describe the icon's function. For example:
image = [[File:Purple question mark.svg|40px|link=Special:Random|alt=Random article]]
An icon whose license requires attribution may have alt text, but must keep the default link. Although public domain images do not require a link, many licenses do require one. Please see Purely decorative images for more information about licensing.
none = Means that no image is used.
blank = This parameter is now deprecated. If you see it in use, change it to "image=none".

imagewidth

Optional CSS value used to set width of image's div section. Allowing you to use images wider than the default 52px wide.
Example
imagewidth=100px

imageright

No parameter = If no imageright parameter is given then no image is shown on the right side.
An image = Should be an image with usual wiki notation. 40px - 50px width are usually about right depending on the image height to width ratio. (Images over 52 pixels width will cause padding problems, unless you also set imagerightwidth.) For example:
imageright = [[File:Nuvola apps bookcase.png|40px|alt=Three stacked books]]
Anything = Any other object that you want to show on the right side.

imagerightwidth

Optional CSS value used to set width of image's div section. Allowing you to use images wider than the default 52px wide.
Example
imagerightwidth=100px

style

Optional CSS values used by the entire message box table. Without quotation marks " " but with the ending semicolons ;. For example:
style = margin-bottom: 0.5em;

textstyle

Optional CSS values used by the text cell. For example:
textstyle = text-align: center;

text

The message body text.

The small parameters

The small article message boxes are meant for the top of sections. Normally they should only contain one or two lines of text.

small

left = Makes it a smaller left aligned message box. This also makes the default images smaller. Note that any data fed to the smallimage, smallimageright and smalltext parameters is only used if "small=left". To make it so your template also understands the small parameter you can use this code:
small = {{{small|}}}

Template loop detected: Template:Mbox Template loop detected: Template:Mbox

smallimage

No parameter = If no smallimage parameter is given then this template falls back to use the image parameter. If the image parameter also is empty then a small default image is used.
An image = Should be an image with usual wiki notation. 20px width is usually about right for boxes with one line of text, while 25px width is usually about right for boxes with two lines of text. For example:
smallimage = [[File:Gnome globe current event.svg|20px|alt=Clock over a larger globe]]
none = Means that no image is used. This overrides any image fed to image, when "small=left".

Template loop detected: Template:Mbox

smallimageright

No parameter = If no smallimageright parameter is given then this template falls back to use the imageright parameter. If the imageright parameter also is empty then no image is shown on the right side.
An image = Should be an image with usual wiki notation. 20px - 25px width is usually about right. For example:
smallimageright = [[File:Nuvola apps bookcase.png|20px|alt=Three stacked books]]
Anything = Any other object that you want to show on the right side.
none = Means that no right side image is used. This overrides any image fed to imageright, when "small=left".

Template loop detected: Template:Mbox

smalltext

A shorter version of the message body text. If no smalltext parameter is given then this template falls back to use the text parameter.

Technical details

If you need to use special characters in the text parameter then you need to escape them like this:

{{mbox
| text  = <div>
Equal sign = and a start and end brace { } work fine as they are.
But here is a pipe &#124; and two end braces <nowiki>}}</nowiki>.
And now a pipe and end braces <nowiki>|}}</nowiki>.
</div>
}}

Template loop detected: Template:Mbox

The <div> tags that surround the text in the example above are usually not needed. But if the text contains line breaks then sometimes we get weird line spacing. This especially happens when using vertical dotted lists. Then use the div tags to fix that.

This template uses CSS classes in MediaWiki:Common.css for most of its looks, thus it is fully skinnable.

This template calls Template:Tl which holds most of the code for Template:Tl, while Template:Tl itself does parameter preprocessing.

Internally this meta-template uses HTML wikimarkup instead of wikimarkup for the table code. That is the usual way we make meta-templates since wikimarkup has several drawbacks. For instance it makes it harder to use parser functions and some special characters in parameters.

The default images for this meta-template are in png format instead of svg format. The main reason is that some older web browsers have trouble with the transparent background that MediaWiki renders for svg images. The png images here have hand optimised transparent background colour so they look good in all browsers. Note that svg icons only look somewhat bad in the old browsers, thus such hand optimisation is only worth the trouble for very widely used icons.

For more technical details see the talk page and the "See also" links below.

See also

Template:Mbox templates Other pages:

</text><sha1>5cafb545bbublgg4mei08dvwxs9zay9</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Mbox templates</title><ns>10</ns><id>95150</id><revision><id>692773</id><parentid>565939</parentid><timestamp>2013-05-21T16:37:34Z</timestamp><contributor><ip>90.209.78.127</ip></contributor><text xml:space="preserve" bytes="268">Template:Nmbox</text><sha1>mm2hquqpmw1k85xftye00jkid2a0l4u</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Namespace detect</title><ns>10</ns><id>79689</id><revision><id>695915</id><parentid>497627</parentid><timestamp>2013-05-27T09:23:36Z</timestamp><contributor><ip>81.129.84.113</ip></contributor><text xml:space="preserve" bytes="1470">{{#switch:

 {{#if: 
   | {{{demospace}}}
   | {{#if: 
     | 
       {{#ifeq:|
       | talk
       |  
       }}
     | 
       {{#ifeq:template|template talk
       | talk
       | template 
       }}
     }}
   }}

| main | = | talk = | user = | project = | file | image = | mediawiki = | template = | help = | category = | book = | extension = | other | #default =

}}</text><sha1>qry2n28n1p12gxaxgu7gs1bkzywbpqv</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Nmbox</title><ns>10</ns><id>47495</id><revision><id>556782</id><parentid>328128</parentid><timestamp>2012-06-29T10:35:15Z</timestamp><contributor><username>Krinkle</username><id>135822</id></contributor><text xml:space="preserve" bytes="587"> {{#if: | |

}}

type = style
small = left
</text><sha1>6k7jc6wiy6i7qy82dd4dw1xja6e8k5w</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Ombox</title><ns>10</ns><id>93344</id><revision><id>634878</id><parentid>634793</parentid><timestamp>2013-01-25T22:39:30Z</timestamp><contributor><username>Kaldari</username><id>31661</id></contributor><comment>reverting breakage</comment><text xml:space="preserve" bytes="723">{{#ifeq:left|yes

| Template:Ombox/core | Template:Ombox/core

}}</text><sha1>p9vh00dqvq0u1q3950ueg6abd93dyrt</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Ombox/core</title><ns>10</ns><id>93345</id><revision><id>680423</id><parentid>680422</parentid><timestamp>2013-04-29T09:31:02Z</timestamp><contributor><username>Siebrand</username><id>5665</id></contributor><minor/><comment>Protected "Template:Ombox/core": Highly visible template ([Edit=Allow only autoconfirmed users] (indefinite) [Move=Allow only autoconfirmed users] (indefinite))</comment><text xml:space="preserve" bytes="2250"> {{#ifeq:|none | | }}

{{#if: | {{#ifeq:|none

 | 
|
 }}

}}

{{#switch:style

| | critical | important | warning | caution | license | speedy | delete | content | style | move | protection | notice =

| #default =
This message box is using an invalid "type=style" parameter and needs fixing.
[[Category:Wikipedia message box parameter needs fixing|Template:Main otherTemplate:Mbox]]

}}</text><sha1>l3n9mp2c6ch14gekpe1oxxe8thp3xdb</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Para</title><ns>10</ns><id>40658</id><revision><id>557339</id><parentid>557338</parentid><timestamp>2012-06-30T23:27:18Z</timestamp><contributor><username>Reedy</username><id>28424</id></contributor><minor/><comment>1 revision from w:en:Template:Para</comment><text xml:space="preserve" bytes="238">|{{#if:|{{{1}}}=|}}</text><sha1>3ve3qhqjaafu9wuy6em7y1fz49qyqfx</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Purge</title><ns>10</ns><id>31341</id><revision><id>405355</id><parentid>405354</parentid><timestamp>2011-05-24T01:39:17Z</timestamp><contributor><username>Peachey88</username><id>31302</id></contributor><minor/><comment>1 revision from w:en:Template:Purge: update to en.wiki</comment><text xml:space="preserve" bytes="197">Purge</text><sha1>830osaj62tvmlh6zq374ixtzbukxcih</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Tl</title><ns>10</ns><id>12644</id><redirect title="Template:Tlx"/><revision><id>760820</id><parentid>760712</parentid><timestamp>2013-08-10T10:29:27Z</timestamp><contributor><username>IAlex</username><id>17961</id></contributor><minor/><comment>Reverted edits by 175.200.179.56 (talk) to last revision by Varnent</comment><text xml:space="preserve" bytes="25">#REDIRECTTemplate:Tlx</text><sha1>avv0qklcaxr8n5r45lcc2x17y9w78sc</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Tlx</title><ns>10</ns><id>20809</id><revision><id>557363</id><parentid>534113</parentid><timestamp>2012-06-30T23:27:22Z</timestamp><contributor><username>Reedy</username><id>28424</id></contributor><minor/><comment>1 revision from w:en:Template:Tlx</comment><text xml:space="preserve" bytes="385">{{[[Template:|]]{{#if:| |{{{2}}} }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}}</text><sha1>0d6b5bkc7j2tegvw2yzm4b6iil98xqg</sha1>

smallimage

No parameter = If no smallimage parameter is given then this template falls back to use the image parameter. If the image parameter also is empty then a small default image is used.
An image = Should be an image with usual wiki notation. 20px width is usually about right for boxes with one line of text, while 25px width is usually about right for boxes with two lines of text. For example:
smallimage = [[File:Gnome globe current event.svg|20px|alt=Clock over a larger globe]]
none = Means that no image is used. This overrides any image fed to image, when "small=left".

<mediawiki xsi:schemaLocation="http://www.mediawiki.org/xml/export-0.8/ http://www.mediawiki.org/xml/export-0.8.xsd" version="0.8" xml:lang="en"><siteinfo><sitename>MediaWiki</sitename><base>http://www.mediawiki.org/wiki/MediaWiki</base><generator>MediaWiki 1.22wmf12</generator><case>first-letter</case><namespaces><namespace key="-2" case="first-letter">Media</namespace><namespace key="-1" case="first-letter">Special</namespace><namespace key="0" case="first-letter"/><namespace key="1" case="first-letter">Talk</namespace><namespace key="2" case="first-letter">User</namespace><namespace key="3" case="first-letter">User talk</namespace><namespace key="4" case="first-letter">Project</namespace><namespace key="5" case="first-letter">Project talk</namespace><namespace key="6" case="first-letter">File</namespace><namespace key="7" case="first-letter">File talk</namespace><namespace key="8" case="first-letter">MediaWiki</namespace><namespace key="9" case="first-letter">MediaWiki talk</namespace><namespace key="10" case="first-letter">Template</namespace><namespace key="11" case="first-letter">Template talk</namespace><namespace key="12" case="first-letter">Help</namespace><namespace key="13" case="first-letter">Help talk</namespace><namespace key="14" case="first-letter">Category</namespace><namespace key="15" case="first-letter">Category talk</namespace><namespace key="90" case="first-letter">Thread</namespace><namespace key="91" case="first-letter">Thread talk</namespace><namespace key="92" case="first-letter">Summary</namespace><namespace key="93" case="first-letter">Summary talk</namespace><namespace key="100" case="first-letter">Manual</namespace><namespace key="101" case="first-letter">Manual talk</namespace><namespace key="102" case="first-letter">Extension</namespace><namespace key="103" case="first-letter">Extension talk</namespace><namespace key="104" case="first-letter">API</namespace><namespace key="105" case="first-letter">API talk</namespace><namespace key="106" case="first-letter">Skin</namespace><namespace key="107" case="first-letter">Skin talk</namespace><namespace key="828" case="first-letter">Module</namespace><namespace key="829" case="first-letter">Module talk</namespace><namespace key="1198" case="first-letter">Translations</namespace><namespace key="1199" case="first-letter">Translations talk</namespace><namespace key="2500" case="first-letter">VisualEditor</namespace><namespace key="2501" case="first-letter">VisualEditor talk</namespace></namespaces></siteinfo><page><title>Template:Mbox</title><ns>10</ns><id>45372</id><revision><id>634882</id><parentid>634876</parentid><timestamp>2013-01-25T22:40:38Z</timestamp><contributor><username>Kaldari</username><id>31661</id></contributor><comment>reverting self, problem was in ombox template</comment><text xml:space="preserve" bytes="707">{{

 Template:Namespace detect

| type = | image = File:Replacement filing cabinet.svg | imageright = | class = | style = | textstyle = | text = small = left
image = [[File:Replacement filing cabinet.svg|50px|link=|alt=]]
smallimage = [[File:Replacement filing cabinet.svg|25px|link=|alt=]] | small = left | smallimage = File:Replacement filing cabinet.svg | smallimageright = | smalltext = | subst = | date = | name = }}</text><sha1>40w6e1mdq2t695t9dv143e1rzq5pv1o</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation</title><ns>10</ns><id>20803</id><revision><id>688512</id><parentid>687083</parentid><timestamp>2013-05-11T17:18:34Z</timestamp><contributor><username>Wargo</username><id>25061</id></contributor><text xml:space="preserve" bytes="2079">{{#ifeq: Mbox | sandbox

|
Template:Template sandbox notice

}}Template:Documentation/start box2 {{#switch: {{#if:|1|0}}{{#if:|1|0}}{{#ifexist:|1|0}}{{#ifexist:Template:Documentation/docspace:Template:Documentation/template page/doc|1|0}} | 1000 | 1001 | 1010 | 1011 | 1100 | 1101 | 1110 | 1111 = | 0110 | 0111 = {{ {{{1}}} }} | 0001 | 0011 = {{ Template:Documentation/docspace:Template:Documentation/template page/doc }} | 0000 | 0100 | 0010 | 0101 = }} Template:Documentation/end box2</text><sha1>bvikrz5412m4gizkphh8ftj604e3kbf</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/docspace</title><ns>10</ns><id>93323</id><revision><id>631615</id><parentid>557279</parentid><timestamp>2013-01-20T15:55:26Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><minor/><comment>1 revision from w:en:Template:Documentation/docspace: Requested by average_drifter in #mediawiki</comment><text xml:space="preserve" bytes="302">{{#switch: Template

 | 
 | File
 | MediaWiki
 | Category = Template talk
 | #default = Template
}}</text><sha1>7f8iymss9sr4v7f4t5pza1arwjogrv3</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/end box</title><ns>10</ns><id>93324</id><revision><id>631856</id><parentid>631623</parentid><timestamp>2013-01-20T16:24:41Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><text xml:space="preserve" bytes="4124">

{{#if:

 {{#ifeq:  | off
 |
 | yes{{
   #switch: Template
   | User
   | Template = yes
   }}
 }}

| Template:Fmbox }}{{#if:

 {{#switch: Mbox
 | doc
 | testcases = strange
 }}

| [[Category:Wikipedia pages with strange ((documentation)) usage|Template:Main otherTemplate:Mbox]]

}}</text><sha1>r3qht4u0hwps2mqnst3puyi8anb9dmz</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/end box2</title><ns>10</ns><id>124329</id><revision><id>688362</id><parentid>688359</parentid><timestamp>2013-05-11T09:36:55Z</timestamp><contributor><username>Shirayuki</username><id>472859</id></contributor><comment>Undo revision 688359 by Shirayuki (talk)</comment><text xml:space="preserve" bytes="864">Template:Documentation/end box</text><sha1>sfe0ppdpxp1nwfzhpym4jwdtmgpph1p</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/start box</title><ns>10</ns><id>93326</id><revision><id>742132</id><parentid>742131</parentid><timestamp>2013-07-20T14:04:29Z</timestamp><contributor><ip>81.129.86.23</ip></contributor><text xml:space="preserve" bytes="2002">

{{#ifeq: ¬ |

|

|
{{#switch: ¬
 | ¬ =   
   {{#switch: Template 
   | Template = File:Template-info.png Template documentation
   | Template:Ns:Module = File:Template-info.png Module documentation
   | File = Summary
   | #default = Documentation
   }}
 | #default = 
   
 }}{{
 #if: 
 | 
 | 
   {{
   #if: yes
   | [view] [edit] [history] [[[:Template:Purge]]] 
   | 
     [#if:  _        | %7B%7B%7Bpreload%7D%7D%7D_        | {{#ifeq: Template | File_          | Template:Documentation/preload-filespace_          | Template:Documentation/preload_          }} }} create]
   }}
}}

}}</text><sha1>linb792zr3zrp72qrhjkmqg1mz6uevr</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/start box2</title><ns>10</ns><id>93327</id><revision><id>631642</id><parentid>585737</parentid><timestamp>2013-01-20T15:55:27Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><minor/><comment>4 revisions from w:en:Template:Documentation/start box2: Requested by average_drifter in #mediawiki</comment><text xml:space="preserve" bytes="625">Template:Documentation/start box</text><sha1>t5j6y918odlsx0iuls0qgi6wbl050q3</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/template page</title><ns>10</ns><id>93328</id><revision><id>631644</id><parentid>557289</parentid><timestamp>2013-01-20T15:55:27Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><minor/><comment>1 revision from w:en:Template:Documentation/template page: Requested by average_drifter in #mediawiki</comment><text xml:space="preserve" bytes="232">{{#switch: Mbox | sandbox | testcases = Mbox | #default = Mbox }}</text><sha1>fenc3r6oe2sito28b1d8xgyo9gpq5uf</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation subpage</title><ns>10</ns><id>20806</id><revision><id>757428</id><parentid>715052</parentid><timestamp>2013-08-05T14:14:46Z</timestamp><contributor><username>IAlex</username><id>17961</id></contributor><minor/><comment>Reverted edits by 90.219.4.40 (talk) to last revision by Shirayuki</comment><text xml:space="preserve" bytes="2616">{{#if: |

File:Edit-paste.svg This is the template documentation page for Template:Mbox.
This page may not be intended to be viewed directly.
Links using variables may appear broken; do not replace these with hardcoded page names or URLs.
{{#if:x||

}} |{{#ifeq: mbox | doc

 | 

{{

   #ifeq: show | show
   | Template loop detected: Template:Mbox
   }}{{
   #if: 
   | 
   | {{#ifeq:Template|Template|}}
 }}

| }}

}}</text><sha1>7a3si8r4k2z0aqxpbbxz1c0gmny5pb9</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Fmbox</title><ns>10</ns><id>37655</id><revision><id>558796</id><parentid>558707</parentid><timestamp>2012-07-05T06:11:26Z</timestamp><contributor><username>Krinkle</username><id>135822</id></contributor><comment>update from enwiki</comment><text xml:space="preserve" bytes="1344"> {{#ifeq:File:Replacement filing cabinet.svg|none | | }}

{{#if:

|

}}

{{#switch:

| | warning | editnotice | system =

| #default =
This message box is using an invalid "type=" parameter and needs fixing.
[[Category:Wikipedia message box parameter needs fixing|Template:Main otherTemplate:Mbox]]

}}</text><sha1>mrldgfpkjyqf89ukmq2vy7gh3ir2j7i</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Mbox/doc</title><ns>10</ns><id>45374</id><revision><id>659649</id><parentid>651771</parentid><timestamp>2013-03-14T09:07:42Z</timestamp><contributor><username>Krinkle</username><id>135822</id></contributor><text xml:space="preserve" bytes="14176">Template:Documentation subpage This is the Template:Tl or message box meta-template.

It is used to build message box templates such as Template:Tl. It offers several different colours, uses default images if no image parameter is given and it has some other features.

This meta-template uses the mbox CSS classes in MediaWiki:Common.css. The classes can also be used directly in a wikitable if special functionality is needed. See the how-to guide for that.

Usage

Simple usage example:

{{mbox | text = Some text.}}

Template loop detected: Template:Mbox Complex example:

{{mbox
| type       = style
| small      = left
| image      = [[File:Emblem-question-yellow.svg|40px|alt=Question mark]]
| smallimage = [[File:Emblem-question-yellow.svg|20px|alt=Question mark]]
| textstyle  = color: red; font-weight: bold; font-style: italic;
| text       = Text for a big box, for the top of articles.
| smalltext  = Text for the top of article sections.
}}

Template loop detected: Template:Mbox

But you are not really supposed to use red bold italic text.

Message box types

The following examples use different type parameters but use no image parameters thus they use the default images for each type.

Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox

Other images

The default images shown above are mostly for convenience. In many cases it is more appropriate to use more specific images. These examples use the image parameter to specify an image other than the default images.

Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox

More examples

Some other parameter combinations.

Template loop detected: Template:Mbox Template loop detected: Template:Mbox

Template loop detected: Template:Mbox

Template loop detected: Template:Mbox

Parameters

List of all parameters:

{{mbox
| type  = critical / serious / warning / notice / / move / protection
| image = none / [[File:...|40px|...]]
| imagewidth = width of image section / default is 52px
| imageright = [[File:...|40px|...]]
| imagerightwidth = width of right image section / default is 52px
| style = CSS values
| textstyle = CSS values
| text  = The message body text.
| small = {{{small|}}} / left
| smallimage = none / [[File:...|20px|...]]
| smallimageright = none / [[File:...|20px|...]]
| smalltext  = A shorter message body text.
}}

type

If no type parameter is given the template has a 'blank' style.

image

No parameter = If no image parameter is given the template uses a default image. Which default image it uses depends on the type parameter.
An image = Should be an image with usual wiki notation. Widths of 40px - 50px are usually about right. (Images over 52 pixels wide will cause padding problems, unless you also set imagewidth.)
Often an icon is purely decorative in the W3C sense that it repeats the text. To improve accessibility, it is desirable to not have it be announced by screen readers, as well as to avoid it linking to an irrelevant page. If (and only if) the image license allows this, it can be marked with "Template:ParaTemplate:Para". For example:
image = [[File:Unbalanced scales.svg|40px|link=|alt=]]
Conversely, an icon that does not use "Template:ParaTemplate:Para", and which therefore is announced to visually impaired readers, should use an "Template:Para" parameter that describes the icon. With no Template:Para parameter (using the default link), the alt text should describe the icon's visual appearance. For example:
image = [[File:Gnome globe current event.svg|40px|alt=Clock over a larger globe]]
With a nonempty "Template:Para" the alt text should describe the icon's function. For example:
image = [[File:Purple question mark.svg|40px|link=Special:Random|alt=Random article]]
An icon whose license requires attribution may have alt text, but must keep the default link. Although public domain images do not require a link, many licenses do require one. Please see Purely decorative images for more information about licensing.
none = Means that no image is used.
blank = This parameter is now deprecated. If you see it in use, change it to "image=none".

imagewidth

Optional CSS value used to set width of image's div section. Allowing you to use images wider than the default 52px wide.
Example
imagewidth=100px

imageright

No parameter = If no imageright parameter is given then no image is shown on the right side.
An image = Should be an image with usual wiki notation. 40px - 50px width are usually about right depending on the image height to width ratio. (Images over 52 pixels width will cause padding problems, unless you also set imagerightwidth.) For example:
imageright = [[File:Nuvola apps bookcase.png|40px|alt=Three stacked books]]
Anything = Any other object that you want to show on the right side.

imagerightwidth

Optional CSS value used to set width of image's div section. Allowing you to use images wider than the default 52px wide.
Example
imagerightwidth=100px

style

Optional CSS values used by the entire message box table. Without quotation marks " " but with the ending semicolons ;. For example:
style = margin-bottom: 0.5em;

textstyle

Optional CSS values used by the text cell. For example:
textstyle = text-align: center;

text

The message body text.

The small parameters

The small article message boxes are meant for the top of sections. Normally they should only contain one or two lines of text.

small

left = Makes it a smaller left aligned message box. This also makes the default images smaller. Note that any data fed to the smallimage, smallimageright and smalltext parameters is only used if "small=left". To make it so your template also understands the small parameter you can use this code:
small = {{{small|}}}

Template loop detected: Template:Mbox Template loop detected: Template:Mbox

smallimage

No parameter = If no smallimage parameter is given then this template falls back to use the image parameter. If the image parameter also is empty then a small default image is used.
An image = Should be an image with usual wiki notation. 20px width is usually about right for boxes with one line of text, while 25px width is usually about right for boxes with two lines of text. For example:
smallimage = [[File:Gnome globe current event.svg|20px|alt=Clock over a larger globe]]
none = Means that no image is used. This overrides any image fed to image, when "small=left".

Template loop detected: Template:Mbox

smallimageright

No parameter = If no smallimageright parameter is given then this template falls back to use the imageright parameter. If the imageright parameter also is empty then no image is shown on the right side.
An image = Should be an image with usual wiki notation. 20px - 25px width is usually about right. For example:
smallimageright = [[File:Nuvola apps bookcase.png|20px|alt=Three stacked books]]
Anything = Any other object that you want to show on the right side.
none = Means that no right side image is used. This overrides any image fed to imageright, when "small=left".

Template loop detected: Template:Mbox

smalltext

A shorter version of the message body text. If no smalltext parameter is given then this template falls back to use the text parameter.

Technical details

If you need to use special characters in the text parameter then you need to escape them like this:

{{mbox
| text  = <div>
Equal sign = and a start and end brace { } work fine as they are.
But here is a pipe &#124; and two end braces <nowiki>}}</nowiki>.
And now a pipe and end braces <nowiki>|}}</nowiki>.
</div>
}}

Template loop detected: Template:Mbox

The <div> tags that surround the text in the example above are usually not needed. But if the text contains line breaks then sometimes we get weird line spacing. This especially happens when using vertical dotted lists. Then use the div tags to fix that.

This template uses CSS classes in MediaWiki:Common.css for most of its looks, thus it is fully skinnable.

This template calls Template:Tl which holds most of the code for Template:Tl, while Template:Tl itself does parameter preprocessing.

Internally this meta-template uses HTML wikimarkup instead of wikimarkup for the table code. That is the usual way we make meta-templates since wikimarkup has several drawbacks. For instance it makes it harder to use parser functions and some special characters in parameters.

The default images for this meta-template are in png format instead of svg format. The main reason is that some older web browsers have trouble with the transparent background that MediaWiki renders for svg images. The png images here have hand optimised transparent background colour so they look good in all browsers. Note that svg icons only look somewhat bad in the old browsers, thus such hand optimisation is only worth the trouble for very widely used icons.

For more technical details see the talk page and the "See also" links below.

See also

Template:Mbox templates Other pages:

</text><sha1>5cafb545bbublgg4mei08dvwxs9zay9</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Mbox templates</title><ns>10</ns><id>95150</id><revision><id>692773</id><parentid>565939</parentid><timestamp>2013-05-21T16:37:34Z</timestamp><contributor><ip>90.209.78.127</ip></contributor><text xml:space="preserve" bytes="268">Template:Nmbox</text><sha1>mm2hquqpmw1k85xftye00jkid2a0l4u</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Namespace detect</title><ns>10</ns><id>79689</id><revision><id>695915</id><parentid>497627</parentid><timestamp>2013-05-27T09:23:36Z</timestamp><contributor><ip>81.129.84.113</ip></contributor><text xml:space="preserve" bytes="1470">{{#switch:

 {{#if: 
   | {{{demospace}}}
   | {{#if: 
     | 
       {{#ifeq:|
       | talk
       |  
       }}
     | 
       {{#ifeq:template|template talk
       | talk
       | template 
       }}
     }}
   }}

| main | = | talk = | user = | project = | file | image = File:Replacement filing cabinet.svg | mediawiki = | template = | help = | category = | book = | extension = | other | #default =

}}</text><sha1>qry2n28n1p12gxaxgu7gs1bkzywbpqv</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Nmbox</title><ns>10</ns><id>47495</id><revision><id>556782</id><parentid>328128</parentid><timestamp>2012-06-29T10:35:15Z</timestamp><contributor><username>Krinkle</username><id>135822</id></contributor><text xml:space="preserve" bytes="587"> {{#if:File:Replacement filing cabinet.svg | |

}}

File:Replacement filing cabinet.svg small = left
image = [[File:Replacement filing cabinet.svg|50px|link=|alt=]]
smallimage = [[File:Replacement filing cabinet.svg|25px|link=|alt=]]
</text><sha1>6k7jc6wiy6i7qy82dd4dw1xja6e8k5w</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Ombox</title><ns>10</ns><id>93344</id><revision><id>634878</id><parentid>634793</parentid><timestamp>2013-01-25T22:39:30Z</timestamp><contributor><username>Kaldari</username><id>31661</id></contributor><comment>reverting breakage</comment><text xml:space="preserve" bytes="723">{{#ifeq:left|yes

| Template:Ombox/core | Template:Ombox/core

}}</text><sha1>p9vh00dqvq0u1q3950ueg6abd93dyrt</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Ombox/core</title><ns>10</ns><id>93345</id><revision><id>680423</id><parentid>680422</parentid><timestamp>2013-04-29T09:31:02Z</timestamp><contributor><username>Siebrand</username><id>5665</id></contributor><minor/><comment>Protected "Template:Ombox/core": Highly visible template ([Edit=Allow only autoconfirmed users] (indefinite) [Move=Allow only autoconfirmed users] (indefinite))</comment><text xml:space="preserve" bytes="2250"> {{#ifeq:File:Replacement filing cabinet.svg|none | | }}

{{#if: | {{#ifeq:|none

 | 
|
 }}

}}

{{#switch:

| | critical | important | warning | caution | license | speedy | delete | content | style | move | protection | notice =

| #default =
This message box is using an invalid "type=" parameter and needs fixing.
[[Category:Wikipedia message box parameter needs fixing|Template:Main otherTemplate:Mbox]]

}}</text><sha1>l3n9mp2c6ch14gekpe1oxxe8thp3xdb</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Para</title><ns>10</ns><id>40658</id><revision><id>557339</id><parentid>557338</parentid><timestamp>2012-06-30T23:27:18Z</timestamp><contributor><username>Reedy</username><id>28424</id></contributor><minor/><comment>1 revision from w:en:Template:Para</comment><text xml:space="preserve" bytes="238">|{{#if:|{{{1}}}=|}}</text><sha1>3ve3qhqjaafu9wuy6em7y1fz49qyqfx</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Purge</title><ns>10</ns><id>31341</id><revision><id>405355</id><parentid>405354</parentid><timestamp>2011-05-24T01:39:17Z</timestamp><contributor><username>Peachey88</username><id>31302</id></contributor><minor/><comment>1 revision from w:en:Template:Purge: update to en.wiki</comment><text xml:space="preserve" bytes="197">Purge</text><sha1>830osaj62tvmlh6zq374ixtzbukxcih</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Tl</title><ns>10</ns><id>12644</id><redirect title="Template:Tlx"/><revision><id>760820</id><parentid>760712</parentid><timestamp>2013-08-10T10:29:27Z</timestamp><contributor><username>IAlex</username><id>17961</id></contributor><minor/><comment>Reverted edits by 175.200.179.56 (talk) to last revision by Varnent</comment><text xml:space="preserve" bytes="25">#REDIRECTTemplate:Tlx</text><sha1>avv0qklcaxr8n5r45lcc2x17y9w78sc</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Tlx</title><ns>10</ns><id>20809</id><revision><id>557363</id><parentid>534113</parentid><timestamp>2012-06-30T23:27:22Z</timestamp><contributor><username>Reedy</username><id>28424</id></contributor><minor/><comment>1 revision from w:en:Template:Tlx</comment><text xml:space="preserve" bytes="385">{{[[Template:|]]{{#if:| |{{{2}}} }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}}</text><sha1>0d6b5bkc7j2tegvw2yzm4b6iil98xqg</sha1>

smallimageright

No parameter = If no smallimageright parameter is given then this template falls back to use the imageright parameter. If the imageright parameter also is empty then no image is shown on the right side.
An image = Should be an image with usual wiki notation. 20px - 25px width is usually about right. For example:
smallimageright = [[File:Nuvola apps bookcase.png|20px|alt=Three stacked books]]
Anything = Any other object that you want to show on the right side.
none = Means that no right side image is used. This overrides any image fed to imageright, when "small=left".

<mediawiki xsi:schemaLocation="http://www.mediawiki.org/xml/export-0.8/ http://www.mediawiki.org/xml/export-0.8.xsd" version="0.8" xml:lang="en"><siteinfo><sitename>MediaWiki</sitename><base>http://www.mediawiki.org/wiki/MediaWiki</base><generator>MediaWiki 1.22wmf12</generator><case>first-letter</case><namespaces><namespace key="-2" case="first-letter">Media</namespace><namespace key="-1" case="first-letter">Special</namespace><namespace key="0" case="first-letter"/><namespace key="1" case="first-letter">Talk</namespace><namespace key="2" case="first-letter">User</namespace><namespace key="3" case="first-letter">User talk</namespace><namespace key="4" case="first-letter">Project</namespace><namespace key="5" case="first-letter">Project talk</namespace><namespace key="6" case="first-letter">File</namespace><namespace key="7" case="first-letter">File talk</namespace><namespace key="8" case="first-letter">MediaWiki</namespace><namespace key="9" case="first-letter">MediaWiki talk</namespace><namespace key="10" case="first-letter">Template</namespace><namespace key="11" case="first-letter">Template talk</namespace><namespace key="12" case="first-letter">Help</namespace><namespace key="13" case="first-letter">Help talk</namespace><namespace key="14" case="first-letter">Category</namespace><namespace key="15" case="first-letter">Category talk</namespace><namespace key="90" case="first-letter">Thread</namespace><namespace key="91" case="first-letter">Thread talk</namespace><namespace key="92" case="first-letter">Summary</namespace><namespace key="93" case="first-letter">Summary talk</namespace><namespace key="100" case="first-letter">Manual</namespace><namespace key="101" case="first-letter">Manual talk</namespace><namespace key="102" case="first-letter">Extension</namespace><namespace key="103" case="first-letter">Extension talk</namespace><namespace key="104" case="first-letter">API</namespace><namespace key="105" case="first-letter">API talk</namespace><namespace key="106" case="first-letter">Skin</namespace><namespace key="107" case="first-letter">Skin talk</namespace><namespace key="828" case="first-letter">Module</namespace><namespace key="829" case="first-letter">Module talk</namespace><namespace key="1198" case="first-letter">Translations</namespace><namespace key="1199" case="first-letter">Translations talk</namespace><namespace key="2500" case="first-letter">VisualEditor</namespace><namespace key="2501" case="first-letter">VisualEditor talk</namespace></namespaces></siteinfo><page><title>Template:Mbox</title><ns>10</ns><id>45372</id><revision><id>634882</id><parentid>634876</parentid><timestamp>2013-01-25T22:40:38Z</timestamp><contributor><username>Kaldari</username><id>31661</id></contributor><comment>reverting self, problem was in ombox template</comment><text xml:space="preserve" bytes="707">{{

 Template:Namespace detect

| type = | image = | imageright = File:Gnome globe current event.svg | class = | style = | textstyle = | text = small = left
imageright = [[File:Gnome globe current event.svg|50px|alt=Clock over a larger globe]]
smallimageright = none | small = left | smallimage = | smallimageright = none | smalltext = | subst = | date = | name = }}</text><sha1>40w6e1mdq2t695t9dv143e1rzq5pv1o</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation</title><ns>10</ns><id>20803</id><revision><id>688512</id><parentid>687083</parentid><timestamp>2013-05-11T17:18:34Z</timestamp><contributor><username>Wargo</username><id>25061</id></contributor><text xml:space="preserve" bytes="2079">{{#ifeq: Mbox | sandbox

|
Template:Template sandbox notice

}}Template:Documentation/start box2 {{#switch: {{#if:|1|0}}{{#if:|1|0}}{{#ifexist:|1|0}}{{#ifexist:Template:Documentation/docspace:Template:Documentation/template page/doc|1|0}} | 1000 | 1001 | 1010 | 1011 | 1100 | 1101 | 1110 | 1111 = | 0110 | 0111 = {{ {{{1}}} }} | 0001 | 0011 = {{ Template:Documentation/docspace:Template:Documentation/template page/doc }} | 0000 | 0100 | 0010 | 0101 = }} Template:Documentation/end box2</text><sha1>bvikrz5412m4gizkphh8ftj604e3kbf</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/docspace</title><ns>10</ns><id>93323</id><revision><id>631615</id><parentid>557279</parentid><timestamp>2013-01-20T15:55:26Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><minor/><comment>1 revision from w:en:Template:Documentation/docspace: Requested by average_drifter in #mediawiki</comment><text xml:space="preserve" bytes="302">{{#switch: Template

 | 
 | File
 | MediaWiki
 | Category = Template talk
 | #default = Template
}}</text><sha1>7f8iymss9sr4v7f4t5pza1arwjogrv3</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/end box</title><ns>10</ns><id>93324</id><revision><id>631856</id><parentid>631623</parentid><timestamp>2013-01-20T16:24:41Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><text xml:space="preserve" bytes="4124">

{{#if:

 {{#ifeq:  | off
 |
 | yes{{
   #switch: Template
   | User
   | Template = yes
   }}
 }}

| Template:Fmbox }}{{#if:

 {{#switch: Mbox
 | doc
 | testcases = strange
 }}

| [[Category:Wikipedia pages with strange ((documentation)) usage|Template:Main otherTemplate:Mbox]]

}}</text><sha1>r3qht4u0hwps2mqnst3puyi8anb9dmz</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/end box2</title><ns>10</ns><id>124329</id><revision><id>688362</id><parentid>688359</parentid><timestamp>2013-05-11T09:36:55Z</timestamp><contributor><username>Shirayuki</username><id>472859</id></contributor><comment>Undo revision 688359 by Shirayuki (talk)</comment><text xml:space="preserve" bytes="864">Template:Documentation/end box</text><sha1>sfe0ppdpxp1nwfzhpym4jwdtmgpph1p</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/start box</title><ns>10</ns><id>93326</id><revision><id>742132</id><parentid>742131</parentid><timestamp>2013-07-20T14:04:29Z</timestamp><contributor><ip>81.129.86.23</ip></contributor><text xml:space="preserve" bytes="2002">

{{#ifeq: ¬ |

|

|
{{#switch: ¬
 | ¬ =   
   {{#switch: Template 
   | Template = File:Template-info.png Template documentation
   | Template:Ns:Module = File:Template-info.png Module documentation
   | File = Summary
   | #default = Documentation
   }}
 | #default = 
   
 }}{{
 #if: 
 | 
 | 
   {{
   #if: yes
   | [view] [edit] [history] [[[:Template:Purge]]] 
   | 
     [#if:  _        | %7B%7B%7Bpreload%7D%7D%7D_        | {{#ifeq: Template | File_          | Template:Documentation/preload-filespace_          | Template:Documentation/preload_          }} }} create]
   }}
}}

}}</text><sha1>linb792zr3zrp72qrhjkmqg1mz6uevr</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/start box2</title><ns>10</ns><id>93327</id><revision><id>631642</id><parentid>585737</parentid><timestamp>2013-01-20T15:55:27Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><minor/><comment>4 revisions from w:en:Template:Documentation/start box2: Requested by average_drifter in #mediawiki</comment><text xml:space="preserve" bytes="625">Template:Documentation/start box</text><sha1>t5j6y918odlsx0iuls0qgi6wbl050q3</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/template page</title><ns>10</ns><id>93328</id><revision><id>631644</id><parentid>557289</parentid><timestamp>2013-01-20T15:55:27Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><minor/><comment>1 revision from w:en:Template:Documentation/template page: Requested by average_drifter in #mediawiki</comment><text xml:space="preserve" bytes="232">{{#switch: Mbox | sandbox | testcases = Mbox | #default = Mbox }}</text><sha1>fenc3r6oe2sito28b1d8xgyo9gpq5uf</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation subpage</title><ns>10</ns><id>20806</id><revision><id>757428</id><parentid>715052</parentid><timestamp>2013-08-05T14:14:46Z</timestamp><contributor><username>IAlex</username><id>17961</id></contributor><minor/><comment>Reverted edits by 90.219.4.40 (talk) to last revision by Shirayuki</comment><text xml:space="preserve" bytes="2616">{{#if: |

File:Edit-paste.svg This is the template documentation page for Template:Mbox.
This page may not be intended to be viewed directly.
Links using variables may appear broken; do not replace these with hardcoded page names or URLs.
{{#if:x||

}} |{{#ifeq: mbox | doc

 | 

{{

   #ifeq: show | show
   | Template loop detected: Template:Mbox
   }}{{
   #if: 
   | 
   | {{#ifeq:Template|Template|}}
 }}

| }}

}}</text><sha1>7a3si8r4k2z0aqxpbbxz1c0gmny5pb9</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Fmbox</title><ns>10</ns><id>37655</id><revision><id>558796</id><parentid>558707</parentid><timestamp>2012-07-05T06:11:26Z</timestamp><contributor><username>Krinkle</username><id>135822</id></contributor><comment>update from enwiki</comment><text xml:space="preserve" bytes="1344"> {{#ifeq:|none | | }}

{{#if:File:Gnome globe current event.svg

|

}}

{{#switch:

| | warning | editnotice | system =

| #default =
This message box is using an invalid "type=" parameter and needs fixing.
[[Category:Wikipedia message box parameter needs fixing|Template:Main otherTemplate:Mbox]]

}}</text><sha1>mrldgfpkjyqf89ukmq2vy7gh3ir2j7i</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Mbox/doc</title><ns>10</ns><id>45374</id><revision><id>659649</id><parentid>651771</parentid><timestamp>2013-03-14T09:07:42Z</timestamp><contributor><username>Krinkle</username><id>135822</id></contributor><text xml:space="preserve" bytes="14176">Template:Documentation subpage This is the Template:Tl or message box meta-template.

It is used to build message box templates such as Template:Tl. It offers several different colours, uses default images if no image parameter is given and it has some other features.

This meta-template uses the mbox CSS classes in MediaWiki:Common.css. The classes can also be used directly in a wikitable if special functionality is needed. See the how-to guide for that.

Usage

Simple usage example:

{{mbox | text = Some text.}}

Template loop detected: Template:Mbox Complex example:

{{mbox
| type       = style
| small      = left
| image      = [[File:Emblem-question-yellow.svg|40px|alt=Question mark]]
| smallimage = [[File:Emblem-question-yellow.svg|20px|alt=Question mark]]
| textstyle  = color: red; font-weight: bold; font-style: italic;
| text       = Text for a big box, for the top of articles.
| smalltext  = Text for the top of article sections.
}}

Template loop detected: Template:Mbox

But you are not really supposed to use red bold italic text.

Message box types

The following examples use different type parameters but use no image parameters thus they use the default images for each type.

Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox

Other images

The default images shown above are mostly for convenience. In many cases it is more appropriate to use more specific images. These examples use the image parameter to specify an image other than the default images.

Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox

More examples

Some other parameter combinations.

Template loop detected: Template:Mbox Template loop detected: Template:Mbox

Template loop detected: Template:Mbox

Template loop detected: Template:Mbox

Parameters

List of all parameters:

{{mbox
| type  = critical / serious / warning / notice / / move / protection
| image = none / [[File:...|40px|...]]
| imagewidth = width of image section / default is 52px
| imageright = [[File:...|40px|...]]
| imagerightwidth = width of right image section / default is 52px
| style = CSS values
| textstyle = CSS values
| text  = The message body text.
| small = {{{small|}}} / left
| smallimage = none / [[File:...|20px|...]]
| smallimageright = none / [[File:...|20px|...]]
| smalltext  = A shorter message body text.
}}

type

If no type parameter is given the template has a 'blank' style.

image

No parameter = If no image parameter is given the template uses a default image. Which default image it uses depends on the type parameter.
An image = Should be an image with usual wiki notation. Widths of 40px - 50px are usually about right. (Images over 52 pixels wide will cause padding problems, unless you also set imagewidth.)
Often an icon is purely decorative in the W3C sense that it repeats the text. To improve accessibility, it is desirable to not have it be announced by screen readers, as well as to avoid it linking to an irrelevant page. If (and only if) the image license allows this, it can be marked with "Template:ParaTemplate:Para". For example:
image = [[File:Unbalanced scales.svg|40px|link=|alt=]]
Conversely, an icon that does not use "Template:ParaTemplate:Para", and which therefore is announced to visually impaired readers, should use an "Template:Para" parameter that describes the icon. With no Template:Para parameter (using the default link), the alt text should describe the icon's visual appearance. For example:
image = [[File:Gnome globe current event.svg|40px|alt=Clock over a larger globe]]
With a nonempty "Template:Para" the alt text should describe the icon's function. For example:
image = [[File:Purple question mark.svg|40px|link=Special:Random|alt=Random article]]
An icon whose license requires attribution may have alt text, but must keep the default link. Although public domain images do not require a link, many licenses do require one. Please see Purely decorative images for more information about licensing.
none = Means that no image is used.
blank = This parameter is now deprecated. If you see it in use, change it to "image=none".

imagewidth

Optional CSS value used to set width of image's div section. Allowing you to use images wider than the default 52px wide.
Example
imagewidth=100px

imageright

No parameter = If no imageright parameter is given then no image is shown on the right side.
An image = Should be an image with usual wiki notation. 40px - 50px width are usually about right depending on the image height to width ratio. (Images over 52 pixels width will cause padding problems, unless you also set imagerightwidth.) For example:
imageright = [[File:Nuvola apps bookcase.png|40px|alt=Three stacked books]]
Anything = Any other object that you want to show on the right side.

imagerightwidth

Optional CSS value used to set width of image's div section. Allowing you to use images wider than the default 52px wide.
Example
imagerightwidth=100px

style

Optional CSS values used by the entire message box table. Without quotation marks " " but with the ending semicolons ;. For example:
style = margin-bottom: 0.5em;

textstyle

Optional CSS values used by the text cell. For example:
textstyle = text-align: center;

text

The message body text.

The small parameters

The small article message boxes are meant for the top of sections. Normally they should only contain one or two lines of text.

small

left = Makes it a smaller left aligned message box. This also makes the default images smaller. Note that any data fed to the smallimage, smallimageright and smalltext parameters is only used if "small=left". To make it so your template also understands the small parameter you can use this code:
small = {{{small|}}}

Template loop detected: Template:Mbox Template loop detected: Template:Mbox

smallimage

No parameter = If no smallimage parameter is given then this template falls back to use the image parameter. If the image parameter also is empty then a small default image is used.
An image = Should be an image with usual wiki notation. 20px width is usually about right for boxes with one line of text, while 25px width is usually about right for boxes with two lines of text. For example:
smallimage = [[File:Gnome globe current event.svg|20px|alt=Clock over a larger globe]]
none = Means that no image is used. This overrides any image fed to image, when "small=left".

Template loop detected: Template:Mbox

smallimageright

No parameter = If no smallimageright parameter is given then this template falls back to use the imageright parameter. If the imageright parameter also is empty then no image is shown on the right side.
An image = Should be an image with usual wiki notation. 20px - 25px width is usually about right. For example:
smallimageright = [[File:Nuvola apps bookcase.png|20px|alt=Three stacked books]]
Anything = Any other object that you want to show on the right side.
none = Means that no right side image is used. This overrides any image fed to imageright, when "small=left".

Template loop detected: Template:Mbox

smalltext

A shorter version of the message body text. If no smalltext parameter is given then this template falls back to use the text parameter.

Technical details

If you need to use special characters in the text parameter then you need to escape them like this:

{{mbox
| text  = <div>
Equal sign = and a start and end brace { } work fine as they are.
But here is a pipe &#124; and two end braces <nowiki>}}</nowiki>.
And now a pipe and end braces <nowiki>|}}</nowiki>.
</div>
}}

Template loop detected: Template:Mbox

The <div> tags that surround the text in the example above are usually not needed. But if the text contains line breaks then sometimes we get weird line spacing. This especially happens when using vertical dotted lists. Then use the div tags to fix that.

This template uses CSS classes in MediaWiki:Common.css for most of its looks, thus it is fully skinnable.

This template calls Template:Tl which holds most of the code for Template:Tl, while Template:Tl itself does parameter preprocessing.

Internally this meta-template uses HTML wikimarkup instead of wikimarkup for the table code. That is the usual way we make meta-templates since wikimarkup has several drawbacks. For instance it makes it harder to use parser functions and some special characters in parameters.

The default images for this meta-template are in png format instead of svg format. The main reason is that some older web browsers have trouble with the transparent background that MediaWiki renders for svg images. The png images here have hand optimised transparent background colour so they look good in all browsers. Note that svg icons only look somewhat bad in the old browsers, thus such hand optimisation is only worth the trouble for very widely used icons.

For more technical details see the talk page and the "See also" links below.

See also

Template:Mbox templates Other pages:

</text><sha1>5cafb545bbublgg4mei08dvwxs9zay9</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Mbox templates</title><ns>10</ns><id>95150</id><revision><id>692773</id><parentid>565939</parentid><timestamp>2013-05-21T16:37:34Z</timestamp><contributor><ip>90.209.78.127</ip></contributor><text xml:space="preserve" bytes="268">Template:Nmbox</text><sha1>mm2hquqpmw1k85xftye00jkid2a0l4u</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Namespace detect</title><ns>10</ns><id>79689</id><revision><id>695915</id><parentid>497627</parentid><timestamp>2013-05-27T09:23:36Z</timestamp><contributor><ip>81.129.84.113</ip></contributor><text xml:space="preserve" bytes="1470">{{#switch:

 {{#if: 
   | {{{demospace}}}
   | {{#if: 
     | 
       {{#ifeq:|
       | talk
       |  
       }}
     | 
       {{#ifeq:template|template talk
       | talk
       | template 
       }}
     }}
   }}

| main | = | talk = | user = | project = | file | image = | mediawiki = | template = | help = | category = | book = | extension = | other | #default =

}}</text><sha1>qry2n28n1p12gxaxgu7gs1bkzywbpqv</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Nmbox</title><ns>10</ns><id>47495</id><revision><id>556782</id><parentid>328128</parentid><timestamp>2012-06-29T10:35:15Z</timestamp><contributor><username>Krinkle</username><id>135822</id></contributor><text xml:space="preserve" bytes="587"> {{#if: | |

}}

small = left
imageright = [[File:Gnome globe current event.svg|50px|alt=Clock over a larger globe]]
smallimageright = none
</text><sha1>6k7jc6wiy6i7qy82dd4dw1xja6e8k5w</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Ombox</title><ns>10</ns><id>93344</id><revision><id>634878</id><parentid>634793</parentid><timestamp>2013-01-25T22:39:30Z</timestamp><contributor><username>Kaldari</username><id>31661</id></contributor><comment>reverting breakage</comment><text xml:space="preserve" bytes="723">{{#ifeq:left|yes

| Template:Ombox/core | Template:Ombox/core

}}</text><sha1>p9vh00dqvq0u1q3950ueg6abd93dyrt</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Ombox/core</title><ns>10</ns><id>93345</id><revision><id>680423</id><parentid>680422</parentid><timestamp>2013-04-29T09:31:02Z</timestamp><contributor><username>Siebrand</username><id>5665</id></contributor><minor/><comment>Protected "Template:Ombox/core": Highly visible template ([Edit=Allow only autoconfirmed users] (indefinite) [Move=Allow only autoconfirmed users] (indefinite))</comment><text xml:space="preserve" bytes="2250"> {{#ifeq:|none | | }}

{{#if:File:Gnome globe current event.svg | {{#ifeq:File:Gnome globe current event.svg|none

 | 
|
 }}

}}

{{#switch:

| | critical | important | warning | caution | license | speedy | delete | content | style | move | protection | notice =

| #default =
This message box is using an invalid "type=" parameter and needs fixing.
[[Category:Wikipedia message box parameter needs fixing|Template:Main otherTemplate:Mbox]]

}}</text><sha1>l3n9mp2c6ch14gekpe1oxxe8thp3xdb</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Para</title><ns>10</ns><id>40658</id><revision><id>557339</id><parentid>557338</parentid><timestamp>2012-06-30T23:27:18Z</timestamp><contributor><username>Reedy</username><id>28424</id></contributor><minor/><comment>1 revision from w:en:Template:Para</comment><text xml:space="preserve" bytes="238">|{{#if:|{{{1}}}=|}}</text><sha1>3ve3qhqjaafu9wuy6em7y1fz49qyqfx</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Purge</title><ns>10</ns><id>31341</id><revision><id>405355</id><parentid>405354</parentid><timestamp>2011-05-24T01:39:17Z</timestamp><contributor><username>Peachey88</username><id>31302</id></contributor><minor/><comment>1 revision from w:en:Template:Purge: update to en.wiki</comment><text xml:space="preserve" bytes="197">Purge</text><sha1>830osaj62tvmlh6zq374ixtzbukxcih</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Tl</title><ns>10</ns><id>12644</id><redirect title="Template:Tlx"/><revision><id>760820</id><parentid>760712</parentid><timestamp>2013-08-10T10:29:27Z</timestamp><contributor><username>IAlex</username><id>17961</id></contributor><minor/><comment>Reverted edits by 175.200.179.56 (talk) to last revision by Varnent</comment><text xml:space="preserve" bytes="25">#REDIRECTTemplate:Tlx</text><sha1>avv0qklcaxr8n5r45lcc2x17y9w78sc</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Tlx</title><ns>10</ns><id>20809</id><revision><id>557363</id><parentid>534113</parentid><timestamp>2012-06-30T23:27:22Z</timestamp><contributor><username>Reedy</username><id>28424</id></contributor><minor/><comment>1 revision from w:en:Template:Tlx</comment><text xml:space="preserve" bytes="385">{{[[Template:|]]{{#if:| |{{{2}}} }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}}</text><sha1>0d6b5bkc7j2tegvw2yzm4b6iil98xqg</sha1>

smalltext

A shorter version of the message body text. If no smalltext parameter is given then this template falls back to use the text parameter.

Technical details

If you need to use special characters in the text parameter then you need to escape them like this:

{{mbox
| text  = <div>
Equal sign = and a start and end brace { } work fine as they are.
But here is a pipe &#124; and two end braces <nowiki>}}</nowiki>.
And now a pipe and end braces <nowiki>|}}</nowiki>.
</div>
}}

<mediawiki xsi:schemaLocation="http://www.mediawiki.org/xml/export-0.8/ http://www.mediawiki.org/xml/export-0.8.xsd" version="0.8" xml:lang="en"><siteinfo><sitename>MediaWiki</sitename><base>http://www.mediawiki.org/wiki/MediaWiki</base><generator>MediaWiki 1.22wmf12</generator><case>first-letter</case><namespaces><namespace key="-2" case="first-letter">Media</namespace><namespace key="-1" case="first-letter">Special</namespace><namespace key="0" case="first-letter"/><namespace key="1" case="first-letter">Talk</namespace><namespace key="2" case="first-letter">User</namespace><namespace key="3" case="first-letter">User talk</namespace><namespace key="4" case="first-letter">Project</namespace><namespace key="5" case="first-letter">Project talk</namespace><namespace key="6" case="first-letter">File</namespace><namespace key="7" case="first-letter">File talk</namespace><namespace key="8" case="first-letter">MediaWiki</namespace><namespace key="9" case="first-letter">MediaWiki talk</namespace><namespace key="10" case="first-letter">Template</namespace><namespace key="11" case="first-letter">Template talk</namespace><namespace key="12" case="first-letter">Help</namespace><namespace key="13" case="first-letter">Help talk</namespace><namespace key="14" case="first-letter">Category</namespace><namespace key="15" case="first-letter">Category talk</namespace><namespace key="90" case="first-letter">Thread</namespace><namespace key="91" case="first-letter">Thread talk</namespace><namespace key="92" case="first-letter">Summary</namespace><namespace key="93" case="first-letter">Summary talk</namespace><namespace key="100" case="first-letter">Manual</namespace><namespace key="101" case="first-letter">Manual talk</namespace><namespace key="102" case="first-letter">Extension</namespace><namespace key="103" case="first-letter">Extension talk</namespace><namespace key="104" case="first-letter">API</namespace><namespace key="105" case="first-letter">API talk</namespace><namespace key="106" case="first-letter">Skin</namespace><namespace key="107" case="first-letter">Skin talk</namespace><namespace key="828" case="first-letter">Module</namespace><namespace key="829" case="first-letter">Module talk</namespace><namespace key="1198" case="first-letter">Translations</namespace><namespace key="1199" case="first-letter">Translations talk</namespace><namespace key="2500" case="first-letter">VisualEditor</namespace><namespace key="2501" case="first-letter">VisualEditor talk</namespace></namespaces></siteinfo><page><title>Template:Mbox</title><ns>10</ns><id>45372</id><revision><id>634882</id><parentid>634876</parentid><timestamp>2013-01-25T22:40:38Z</timestamp><contributor><username>Kaldari</username><id>31661</id></contributor><comment>reverting self, problem was in ombox template</comment><text xml:space="preserve" bytes="707">{{

 Template:Namespace detect

| type = | image = | imageright = | class = | style = | textstyle =

| text =

Equal sign = and a start and end brace { } work fine as they are. But here is a pipe | and two end braces }}. And now a pipe and end braces |}}.

| small = | smallimage = | smallimageright = | smalltext = | subst = | date = | name = }}</text><sha1>40w6e1mdq2t695t9dv143e1rzq5pv1o</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation</title><ns>10</ns><id>20803</id><revision><id>688512</id><parentid>687083</parentid><timestamp>2013-05-11T17:18:34Z</timestamp><contributor><username>Wargo</username><id>25061</id></contributor><text xml:space="preserve" bytes="2079">{{#ifeq: Mbox | sandbox

|
Template:Template sandbox notice

}}Template:Documentation/start box2 {{#switch: {{#if:|1|0}}{{#if:|1|0}}{{#ifexist:|1|0}}{{#ifexist:Template:Documentation/docspace:Template:Documentation/template page/doc|1|0}} | 1000 | 1001 | 1010 | 1011 | 1100 | 1101 | 1110 | 1111 = | 0110 | 0111 = {{ {{{1}}} }} | 0001 | 0011 = {{ Template:Documentation/docspace:Template:Documentation/template page/doc }} | 0000 | 0100 | 0010 | 0101 = }} Template:Documentation/end box2</text><sha1>bvikrz5412m4gizkphh8ftj604e3kbf</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/docspace</title><ns>10</ns><id>93323</id><revision><id>631615</id><parentid>557279</parentid><timestamp>2013-01-20T15:55:26Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><minor/><comment>1 revision from w:en:Template:Documentation/docspace: Requested by average_drifter in #mediawiki</comment><text xml:space="preserve" bytes="302">{{#switch: Template

 | 
 | File
 | MediaWiki
 | Category = Template talk
 | #default = Template
}}</text><sha1>7f8iymss9sr4v7f4t5pza1arwjogrv3</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/end box</title><ns>10</ns><id>93324</id><revision><id>631856</id><parentid>631623</parentid><timestamp>2013-01-20T16:24:41Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><text xml:space="preserve" bytes="4124">

{{#if:

 {{#ifeq:  | off
 |
 | yes{{
   #switch: Template
   | User
   | Template = yes
   }}
 }}

| Template:Fmbox }}{{#if:

 {{#switch: Mbox
 | doc
 | testcases = strange
 }}

| [[Category:Wikipedia pages with strange ((documentation)) usage|Template:Main otherTemplate:Mbox]]

}}</text><sha1>r3qht4u0hwps2mqnst3puyi8anb9dmz</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/end box2</title><ns>10</ns><id>124329</id><revision><id>688362</id><parentid>688359</parentid><timestamp>2013-05-11T09:36:55Z</timestamp><contributor><username>Shirayuki</username><id>472859</id></contributor><comment>Undo revision 688359 by Shirayuki (talk)</comment><text xml:space="preserve" bytes="864">Template:Documentation/end box</text><sha1>sfe0ppdpxp1nwfzhpym4jwdtmgpph1p</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/start box</title><ns>10</ns><id>93326</id><revision><id>742132</id><parentid>742131</parentid><timestamp>2013-07-20T14:04:29Z</timestamp><contributor><ip>81.129.86.23</ip></contributor><text xml:space="preserve" bytes="2002">

{{#ifeq: ¬ |

|

|
{{#switch: ¬
 | ¬ =   
   {{#switch: Template 
   | Template = File:Template-info.png Template documentation
   | Template:Ns:Module = File:Template-info.png Module documentation
   | File = Summary
   | #default = Documentation
   }}
 | #default = 
   
 }}{{
 #if: 
 | 
 | 
   {{
   #if: yes
   | [view] [edit] [history] [[[:Template:Purge]]] 
   | 
     [#if:  _        | %7B%7B%7Bpreload%7D%7D%7D_        | {{#ifeq: Template | File_          | Template:Documentation/preload-filespace_          | Template:Documentation/preload_          }} }} create]
   }}
}}

}}</text><sha1>linb792zr3zrp72qrhjkmqg1mz6uevr</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/start box2</title><ns>10</ns><id>93327</id><revision><id>631642</id><parentid>585737</parentid><timestamp>2013-01-20T15:55:27Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><minor/><comment>4 revisions from w:en:Template:Documentation/start box2: Requested by average_drifter in #mediawiki</comment><text xml:space="preserve" bytes="625">Template:Documentation/start box</text><sha1>t5j6y918odlsx0iuls0qgi6wbl050q3</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation/template page</title><ns>10</ns><id>93328</id><revision><id>631644</id><parentid>557289</parentid><timestamp>2013-01-20T15:55:27Z</timestamp><contributor><username>Krenair</username><id>483619</id></contributor><minor/><comment>1 revision from w:en:Template:Documentation/template page: Requested by average_drifter in #mediawiki</comment><text xml:space="preserve" bytes="232">{{#switch: Mbox | sandbox | testcases = Mbox | #default = Mbox }}</text><sha1>fenc3r6oe2sito28b1d8xgyo9gpq5uf</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Documentation subpage</title><ns>10</ns><id>20806</id><revision><id>757428</id><parentid>715052</parentid><timestamp>2013-08-05T14:14:46Z</timestamp><contributor><username>IAlex</username><id>17961</id></contributor><minor/><comment>Reverted edits by 90.219.4.40 (talk) to last revision by Shirayuki</comment><text xml:space="preserve" bytes="2616">{{#if: |

File:Edit-paste.svg This is the template documentation page for Template:Mbox.
This page may not be intended to be viewed directly.
Links using variables may appear broken; do not replace these with hardcoded page names or URLs.
{{#if:x||

}} |{{#ifeq: mbox | doc

 | 

{{

   #ifeq: show | show
   | Template loop detected: Template:Mbox
   }}{{
   #if: 
   | 
   | {{#ifeq:Template|Template|}}
 }}

| }}

}}</text><sha1>7a3si8r4k2z0aqxpbbxz1c0gmny5pb9</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Fmbox</title><ns>10</ns><id>37655</id><revision><id>558796</id><parentid>558707</parentid><timestamp>2012-07-05T06:11:26Z</timestamp><contributor><username>Krinkle</username><id>135822</id></contributor><comment>update from enwiki</comment><text xml:space="preserve" bytes="1344"> {{#ifeq:|none | | }}

{{#if:

|

}}

{{#switch:

| | warning | editnotice | system =

| #default =
This message box is using an invalid "type=" parameter and needs fixing.
[[Category:Wikipedia message box parameter needs fixing|Template:Main otherTemplate:Mbox]]

}}</text><sha1>mrldgfpkjyqf89ukmq2vy7gh3ir2j7i</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Mbox/doc</title><ns>10</ns><id>45374</id><revision><id>659649</id><parentid>651771</parentid><timestamp>2013-03-14T09:07:42Z</timestamp><contributor><username>Krinkle</username><id>135822</id></contributor><text xml:space="preserve" bytes="14176">Template:Documentation subpage This is the Template:Tl or message box meta-template.

It is used to build message box templates such as Template:Tl. It offers several different colours, uses default images if no image parameter is given and it has some other features.

This meta-template uses the mbox CSS classes in MediaWiki:Common.css. The classes can also be used directly in a wikitable if special functionality is needed. See the how-to guide for that.

Usage

Simple usage example:

{{mbox | text = Some text.}}

Template loop detected: Template:Mbox Complex example:

{{mbox
| type       = style
| small      = left
| image      = [[File:Emblem-question-yellow.svg|40px|alt=Question mark]]
| smallimage = [[File:Emblem-question-yellow.svg|20px|alt=Question mark]]
| textstyle  = color: red; font-weight: bold; font-style: italic;
| text       = Text for a big box, for the top of articles.
| smalltext  = Text for the top of article sections.
}}

Template loop detected: Template:Mbox

But you are not really supposed to use red bold italic text.

Message box types

The following examples use different type parameters but use no image parameters thus they use the default images for each type.

Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox

Other images

The default images shown above are mostly for convenience. In many cases it is more appropriate to use more specific images. These examples use the image parameter to specify an image other than the default images.

Template loop detected: Template:Mbox Template loop detected: Template:Mbox Template loop detected: Template:Mbox

More examples

Some other parameter combinations.

Template loop detected: Template:Mbox Template loop detected: Template:Mbox

Template loop detected: Template:Mbox

Template loop detected: Template:Mbox

Parameters

List of all parameters:

{{mbox
| type  = critical / serious / warning / notice / / move / protection
| image = none / [[File:...|40px|...]]
| imagewidth = width of image section / default is 52px
| imageright = [[File:...|40px|...]]
| imagerightwidth = width of right image section / default is 52px
| style = CSS values
| textstyle = CSS values
| text  = The message body text.
| small = {{{small|}}} / left
| smallimage = none / [[File:...|20px|...]]
| smallimageright = none / [[File:...|20px|...]]
| smalltext  = A shorter message body text.
}}

type

If no type parameter is given the template has a 'blank' style.

image

No parameter = If no image parameter is given the template uses a default image. Which default image it uses depends on the type parameter.
An image = Should be an image with usual wiki notation. Widths of 40px - 50px are usually about right. (Images over 52 pixels wide will cause padding problems, unless you also set imagewidth.)
Often an icon is purely decorative in the W3C sense that it repeats the text. To improve accessibility, it is desirable to not have it be announced by screen readers, as well as to avoid it linking to an irrelevant page. If (and only if) the image license allows this, it can be marked with "Template:ParaTemplate:Para". For example:
image = [[File:Unbalanced scales.svg|40px|link=|alt=]]
Conversely, an icon that does not use "Template:ParaTemplate:Para", and which therefore is announced to visually impaired readers, should use an "Template:Para" parameter that describes the icon. With no Template:Para parameter (using the default link), the alt text should describe the icon's visual appearance. For example:
image = [[File:Gnome globe current event.svg|40px|alt=Clock over a larger globe]]
With a nonempty "Template:Para" the alt text should describe the icon's function. For example:
image = [[File:Purple question mark.svg|40px|link=Special:Random|alt=Random article]]
An icon whose license requires attribution may have alt text, but must keep the default link. Although public domain images do not require a link, many licenses do require one. Please see Purely decorative images for more information about licensing.
none = Means that no image is used.
blank = This parameter is now deprecated. If you see it in use, change it to "image=none".

imagewidth

Optional CSS value used to set width of image's div section. Allowing you to use images wider than the default 52px wide.
Example
imagewidth=100px

imageright

No parameter = If no imageright parameter is given then no image is shown on the right side.
An image = Should be an image with usual wiki notation. 40px - 50px width are usually about right depending on the image height to width ratio. (Images over 52 pixels width will cause padding problems, unless you also set imagerightwidth.) For example:
imageright = [[File:Nuvola apps bookcase.png|40px|alt=Three stacked books]]
Anything = Any other object that you want to show on the right side.

imagerightwidth

Optional CSS value used to set width of image's div section. Allowing you to use images wider than the default 52px wide.
Example
imagerightwidth=100px

style

Optional CSS values used by the entire message box table. Without quotation marks " " but with the ending semicolons ;. For example:
style = margin-bottom: 0.5em;

textstyle

Optional CSS values used by the text cell. For example:
textstyle = text-align: center;

text

The message body text.

The small parameters

The small article message boxes are meant for the top of sections. Normally they should only contain one or two lines of text.

small

left = Makes it a smaller left aligned message box. This also makes the default images smaller. Note that any data fed to the smallimage, smallimageright and smalltext parameters is only used if "small=left". To make it so your template also understands the small parameter you can use this code:
small = {{{small|}}}

Template loop detected: Template:Mbox Template loop detected: Template:Mbox

smallimage

No parameter = If no smallimage parameter is given then this template falls back to use the image parameter. If the image parameter also is empty then a small default image is used.
An image = Should be an image with usual wiki notation. 20px width is usually about right for boxes with one line of text, while 25px width is usually about right for boxes with two lines of text. For example:
smallimage = [[File:Gnome globe current event.svg|20px|alt=Clock over a larger globe]]
none = Means that no image is used. This overrides any image fed to image, when "small=left".

Template loop detected: Template:Mbox

smallimageright

No parameter = If no smallimageright parameter is given then this template falls back to use the imageright parameter. If the imageright parameter also is empty then no image is shown on the right side.
An image = Should be an image with usual wiki notation. 20px - 25px width is usually about right. For example:
smallimageright = [[File:Nuvola apps bookcase.png|20px|alt=Three stacked books]]
Anything = Any other object that you want to show on the right side.
none = Means that no right side image is used. This overrides any image fed to imageright, when "small=left".

Template loop detected: Template:Mbox

smalltext

A shorter version of the message body text. If no smalltext parameter is given then this template falls back to use the text parameter.

Technical details

If you need to use special characters in the text parameter then you need to escape them like this:

{{mbox
| text  = <div>
Equal sign = and a start and end brace { } work fine as they are.
But here is a pipe &#124; and two end braces <nowiki>}}</nowiki>.
And now a pipe and end braces <nowiki>|}}</nowiki>.
</div>
}}

Template loop detected: Template:Mbox

The <div> tags that surround the text in the example above are usually not needed. But if the text contains line breaks then sometimes we get weird line spacing. This especially happens when using vertical dotted lists. Then use the div tags to fix that.

This template uses CSS classes in MediaWiki:Common.css for most of its looks, thus it is fully skinnable.

This template calls Template:Tl which holds most of the code for Template:Tl, while Template:Tl itself does parameter preprocessing.

Internally this meta-template uses HTML wikimarkup instead of wikimarkup for the table code. That is the usual way we make meta-templates since wikimarkup has several drawbacks. For instance it makes it harder to use parser functions and some special characters in parameters.

The default images for this meta-template are in png format instead of svg format. The main reason is that some older web browsers have trouble with the transparent background that MediaWiki renders for svg images. The png images here have hand optimised transparent background colour so they look good in all browsers. Note that svg icons only look somewhat bad in the old browsers, thus such hand optimisation is only worth the trouble for very widely used icons.

For more technical details see the talk page and the "See also" links below.

See also

Template:Mbox templates Other pages:

</text><sha1>5cafb545bbublgg4mei08dvwxs9zay9</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Mbox templates</title><ns>10</ns><id>95150</id><revision><id>692773</id><parentid>565939</parentid><timestamp>2013-05-21T16:37:34Z</timestamp><contributor><ip>90.209.78.127</ip></contributor><text xml:space="preserve" bytes="268">Template:Nmbox</text><sha1>mm2hquqpmw1k85xftye00jkid2a0l4u</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Namespace detect</title><ns>10</ns><id>79689</id><revision><id>695915</id><parentid>497627</parentid><timestamp>2013-05-27T09:23:36Z</timestamp><contributor><ip>81.129.84.113</ip></contributor><text xml:space="preserve" bytes="1470">{{#switch:

 {{#if: 
   | {{{demospace}}}
   | {{#if: 
     | 
       {{#ifeq:|
       | talk
       |  
       }}
     | 
       {{#ifeq:template|template talk
       | talk
       | template 
       }}
     }}
   }}

| main | = | talk = | user = | project = | file | image = | mediawiki = | template = | help = | category = | book = | extension = | other | #default =

}}</text><sha1>qry2n28n1p12gxaxgu7gs1bkzywbpqv</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Nmbox</title><ns>10</ns><id>47495</id><revision><id>556782</id><parentid>328128</parentid><timestamp>2012-06-29T10:35:15Z</timestamp><contributor><username>Krinkle</username><id>135822</id></contributor><text xml:space="preserve" bytes="587"> {{#if: | |

}}

Equal sign = and a start and end brace { } work fine as they are. But here is a pipe | and two end braces }}. And now a pipe and end braces |}}.

</text><sha1>6k7jc6wiy6i7qy82dd4dw1xja6e8k5w</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Ombox</title><ns>10</ns><id>93344</id><revision><id>634878</id><parentid>634793</parentid><timestamp>2013-01-25T22:39:30Z</timestamp><contributor><username>Kaldari</username><id>31661</id></contributor><comment>reverting breakage</comment><text xml:space="preserve" bytes="723">{{#ifeq:|yes

| Template:Ombox/core | Template:Ombox/core

}}</text><sha1>p9vh00dqvq0u1q3950ueg6abd93dyrt</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Ombox/core</title><ns>10</ns><id>93345</id><revision><id>680423</id><parentid>680422</parentid><timestamp>2013-04-29T09:31:02Z</timestamp><contributor><username>Siebrand</username><id>5665</id></contributor><minor/><comment>Protected "Template:Ombox/core": Highly visible template ([Edit=Allow only autoconfirmed users] (indefinite) [Move=Allow only autoconfirmed users] (indefinite))</comment><text xml:space="preserve" bytes="2250"> {{#ifeq:|none | | }}

{{#if: | {{#ifeq:|none

 | 
|
 }}

}}

{{#switch:

| | critical | important | warning | caution | license | speedy | delete | content | style | move | protection | notice =

| #default =
This message box is using an invalid "type=" parameter and needs fixing.
[[Category:Wikipedia message box parameter needs fixing|Template:Main otherTemplate:Mbox]]

}}</text><sha1>l3n9mp2c6ch14gekpe1oxxe8thp3xdb</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Para</title><ns>10</ns><id>40658</id><revision><id>557339</id><parentid>557338</parentid><timestamp>2012-06-30T23:27:18Z</timestamp><contributor><username>Reedy</username><id>28424</id></contributor><minor/><comment>1 revision from w:en:Template:Para</comment><text xml:space="preserve" bytes="238">|{{#if:|{{{1}}}=|}}</text><sha1>3ve3qhqjaafu9wuy6em7y1fz49qyqfx</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Purge</title><ns>10</ns><id>31341</id><revision><id>405355</id><parentid>405354</parentid><timestamp>2011-05-24T01:39:17Z</timestamp><contributor><username>Peachey88</username><id>31302</id></contributor><minor/><comment>1 revision from w:en:Template:Purge: update to en.wiki</comment><text xml:space="preserve" bytes="197">Purge</text><sha1>830osaj62tvmlh6zq374ixtzbukxcih</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Tl</title><ns>10</ns><id>12644</id><redirect title="Template:Tlx"/><revision><id>760820</id><parentid>760712</parentid><timestamp>2013-08-10T10:29:27Z</timestamp><contributor><username>IAlex</username><id>17961</id></contributor><minor/><comment>Reverted edits by 175.200.179.56 (talk) to last revision by Varnent</comment><text xml:space="preserve" bytes="25">#REDIRECTTemplate:Tlx</text><sha1>avv0qklcaxr8n5r45lcc2x17y9w78sc</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Tlx</title><ns>10</ns><id>20809</id><revision><id>557363</id><parentid>534113</parentid><timestamp>2012-06-30T23:27:22Z</timestamp><contributor><username>Reedy</username><id>28424</id></contributor><minor/><comment>1 revision from w:en:Template:Tlx</comment><text xml:space="preserve" bytes="385">{{[[Template:|]]{{#if:| |{{{2}}} }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}}</text><sha1>0d6b5bkc7j2tegvw2yzm4b6iil98xqg</sha1>

The <div> tags that surround the text in the example above are usually not needed. But if the text contains line breaks then sometimes we get weird line spacing. This especially happens when using vertical dotted lists. Then use the div tags to fix that.

This template uses CSS classes in MediaWiki:Common.css for most of its looks, thus it is fully skinnable.

This template calls Template:Tl which holds most of the code for Template:Tl, while Template:Tl itself does parameter preprocessing.

Internally this meta-template uses HTML wikimarkup instead of wikimarkup for the table code. That is the usual way we make meta-templates since wikimarkup has several drawbacks. For instance it makes it harder to use parser functions and some special characters in parameters.

The default images for this meta-template are in png format instead of svg format. The main reason is that some older web browsers have trouble with the transparent background that MediaWiki renders for svg images. The png images here have hand optimised transparent background colour so they look good in all browsers. Note that svg icons only look somewhat bad in the old browsers, thus such hand optimisation is only worth the trouble for very widely used icons.

For more technical details see the talk page and the "See also" links below.

See also

Template:Mbox templates Other pages:

</text><sha1>5cafb545bbublgg4mei08dvwxs9zay9</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Mbox templates</title><ns>10</ns><id>95150</id><revision><id>692773</id><parentid>565939</parentid><timestamp>2013-05-21T16:37:34Z</timestamp><contributor><ip>90.209.78.127</ip></contributor><text xml:space="preserve" bytes="268">Template:Nmbox</text><sha1>mm2hquqpmw1k85xftye00jkid2a0l4u</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Namespace detect</title><ns>10</ns><id>79689</id><revision><id>695915</id><parentid>497627</parentid><timestamp>2013-05-27T09:23:36Z</timestamp><contributor><ip>81.129.84.113</ip></contributor><text xml:space="preserve" bytes="1470">{{#switch:

 {{#if: 
   | {{{demospace}}}
   | {{#if: 
     | 
       {{#ifeq:|
       | talk
       |  
       }}
     | 
       {{#ifeq:template|template talk
       | talk
       | template 
       }}
     }}
   }}

| main | = | talk = | user = | project = | file | image = | mediawiki = | template = | help = | category = | book = | extension = | other | #default =

}}

Template:Documentation

</text><sha1>qry2n28n1p12gxaxgu7gs1bkzywbpqv</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Nmbox</title><ns>10</ns><id>47495</id><revision><id>556782</id><parentid>328128</parentid><timestamp>2012-06-29T10:35:15Z</timestamp><contributor><username>Krinkle</username><id>135822</id></contributor><text xml:space="preserve" bytes="587"> {{#if: | |

}}

Template:Documentation </text><sha1>6k7jc6wiy6i7qy82dd4dw1xja6e8k5w</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Ombox</title><ns>10</ns><id>93344</id><revision><id>634878</id><parentid>634793</parentid><timestamp>2013-01-25T22:39:30Z</timestamp><contributor><username>Kaldari</username><id>31661</id></contributor><comment>reverting breakage</comment><text xml:space="preserve" bytes="723">{{#ifeq:|yes | Template:Ombox/core | Template:Ombox/core

}}Template:Documentation</text><sha1>p9vh00dqvq0u1q3950ueg6abd93dyrt</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Ombox/core</title><ns>10</ns><id>93345</id><revision><id>680423</id><parentid>680422</parentid><timestamp>2013-04-29T09:31:02Z</timestamp><contributor><username>Siebrand</username><id>5665</id></contributor><minor/><comment>Protected "Template:Ombox/core": Highly visible template ([Edit=Allow only autoconfirmed users] (indefinite) [Move=Allow only autoconfirmed users] (indefinite))</comment><text xml:space="preserve" bytes="2250"> {{#ifeq:|none | | }}

{{#if: | {{#ifeq:|none

 | 
|
 }}

}}

{{#switch:

| | critical | important | warning | caution | license | speedy | delete | content | style | move | protection | notice =

| #default =
This message box is using an invalid "type=" parameter and needs fixing.
[[Category:Wikipedia message box parameter needs fixing|Template:Main otherTemplate:Mbox]]

}}

Template:Documentation </text><sha1>l3n9mp2c6ch14gekpe1oxxe8thp3xdb</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Para</title><ns>10</ns><id>40658</id><revision><id>557339</id><parentid>557338</parentid><timestamp>2012-06-30T23:27:18Z</timestamp><contributor><username>Reedy</username><id>28424</id></contributor><minor/><comment>1 revision from w:en:Template:Para</comment><text xml:space="preserve" bytes="238">|{{#if:|{{{1}}}=|}} Template:Documentation </text><sha1>3ve3qhqjaafu9wuy6em7y1fz49qyqfx</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Purge</title><ns>10</ns><id>31341</id><revision><id>405355</id><parentid>405354</parentid><timestamp>2011-05-24T01:39:17Z</timestamp><contributor><username>Peachey88</username><id>31302</id></contributor><minor/><comment>1 revision from w:en:Template:Purge: update to en.wiki</comment><text xml:space="preserve" bytes="197">Purge Template:Documentation </text><sha1>830osaj62tvmlh6zq374ixtzbukxcih</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Tl</title><ns>10</ns><id>12644</id><redirect title="Template:Tlx"/><revision><id>760820</id><parentid>760712</parentid><timestamp>2013-08-10T10:29:27Z</timestamp><contributor><username>IAlex</username><id>17961</id></contributor><minor/><comment>Reverted edits by 175.200.179.56 (talk) to last revision by Varnent</comment><text xml:space="preserve" bytes="25">#REDIRECTTemplate:Tlx</text><sha1>avv0qklcaxr8n5r45lcc2x17y9w78sc</sha1><model>wikitext</model><format>text/x-wiki</format></revision></page><page><title>Template:Tlx</title><ns>10</ns><id>20809</id><revision><id>557363</id><parentid>534113</parentid><timestamp>2012-06-30T23:27:22Z</timestamp><contributor><username>Reedy</username><id>28424</id></contributor><minor/><comment>1 revision from w:en:Template:Tlx</comment><text xml:space="preserve" bytes="385">

Doc

See m:Template:Tlx. </text><sha1>0d6b5bkc7j2tegvw2yzm4b6iil98xqg</sha1>