Difference between revisions of "Template:Mbox"

From FIThydrowiki
Jump to navigation Jump to search
what>Davidgothberg
(Planned new version from /sandbox. Many new additions and fixes. See discussions at Wikipedia talk:Article message boxes.)
what>Happy-melon
(steal unused template for a new high-level meta-template (for interaction between {{ambox}}, {{imbox}} and {{cmbox}})
Line 1: Line 1:
<table class="metadata plainlinks ambox
+
{{ {{#switch:{{NAMESPACE}}
{{#switch:{{{type|}}}
+
|{{ns:0}}=ambox
  | speedy    = ambox-speedy  <!-- Can be used from 19 May 2008 -->
+
|{{ns:Image}}=imbox
  | delete                          <!-- delete = serious -->
+
|{{ns:Category}}=cmbox
  | serious    = ambox-delete     
+
|#default=ambox
  | content    = ambox-content
+
}}
  | style      = ambox-style
+
|{{#if:{{{type|}}}|type|}}={{{type|}}}
  | move                            <!-- move = merge -->
+
|{{#if:{{{image|}}}|image|}}={{{image|}}}
  | merge      = ambox-merge  <!--ambox-move can be used 20 May 2008-->
+
|{{#if:{{{style|}}}|style|}}={{{style|}}}
  | protection = ambox-protection
+
|{{#if:{{{textstyle|}}}|textstyle|}}={{{textstyle|}}}
  | notice    = ambox-notice
+
|{{#if:{{{text|}}}|text|}}={{{text|}}}
  | #default  = ambox-notice
 
}}" style="{{{style|}}}">
 
<tr>
 
<td class="ambox-image">
 
{{#ifeq:{{{image|}}}|none
 
  | <!-- No image cell; empty cell necessary for text cell to have 100% width -->
 
  | <div style="width:52px;"> {{#switch:{{{image|{{{type|}}}}}}
 
    | speedy    = [[Image:Ambox speedy deletion.png|40x40px]]
 
    | delete
 
    | serious    = [[Image:Ambox deletion.png|40x40px]]
 
    | content    = [[Image:Ambox content.png|40x40px]]
 
    | style     = [[Image:Ambox style.png|40x40px]]
 
    | move
 
    | merge      = [[Image:Ambox move.png|40x40px]]
 
    | protection = [[Image:Ambox protection.png|40x40px]]
 
    | notice    = [[Image:Ambox notice.png|40x40px]]
 
    | blank      = &nbsp;
 
    | #default  = {{{image|[[Image:Ambox notice.png|40x40px]]}}}
 
  }}</div>
 
}}</td>
 
<td class="ambox-text" style="{{{textstyle|}}}">{{{text}}}</td>
 
{{#if:{{{imageright|}}}
 
  | <td class="ambox-imageright"><div style="width:52px;"> {{{imageright}}} </div></td>
 
 
}}
 
}}
</tr>
 
</table><noinclude>
 
 
{{pp-template|small=yes}}
 
{{Documentation}}
 
<!-- Add categories and interwikis to the /doc subpage, not here! -->
 
</noinclude>
 

Revision as of 10:44, 20 May 2008