Cogito, ergo sum

Difference between revisions of "Template:Ambox"

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
m
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
<table style="{{{style|}}}" class="metadata plainlinks ambox {{#switch:{{{type|}}}
 
<table style="{{{style|}}}" class="metadata plainlinks ambox {{#switch:{{{type|}}}
   | delete   = ambox-delete
+
   | serious  = ambox-serious
 +
   | content  = ambox-content
 
   | style    = ambox-style
 
   | style    = ambox-style
   | merge    = ambox-merge
+
   | info    = ambox-info
  | notice  = ambox-notice
+
 
   | #default = ambox-notice
 
   | #default = ambox-notice
 
}}">
 
}}">
 
<tr>
 
<tr>
 
<td class="ambox-image">
 
<td class="ambox-image">
{{#ifeq:{{{image}}}|none
+
{{#if:{{{image|}}}|<div style="width:52px;">{{{image}}}</div>
  | <!-- no image cell; empty cell necessary for text cell to have 100% width -->
+
  | <div style="width:52px;"> {{#switch:{{{image|{{{type|}}}}}}
+
    | delete  = [[Image:Icon delete.png|40px]]
+
    | style    = [[Image:Broom icon.svg|40px]]
+
    | merge    = [[Image:Merge-split-transwiki default.svg]]
+
    | notice  = [[Image:Info non-talk.png|40px]]
+
    | blank    = [[Image:No image.svg]]
+
    | #default = {{{image|[[Image:Info non-talk.png|40px]]}}}
+
  }}</div>
+
 
}}</td>
 
}}</td>
 
<td class="ambox-text">{{{text}}}</td>
 
<td class="ambox-text">{{{text}}}</td>

Latest revision as of 08:48, 4 March 2008

[edit] Documentation

Usage[edit]

An article message box is usually not used directly, but included through other templates.

Syntax[edit]

{{ambox
| type       = message type
| style      = CSS style
| image      = left side image
| text       = message text
| imageright = right side image
}}

This displays a box similar to the one below:

Only the text parameter is required. The image and imageright parameters should actually be image links.

Predefined message types[edit]

Any type value not specified here falls back to the 'notice' style.