Difference between revisions of "Template:Ambox"

From Team Fortress Wiki
Jump to: navigation, search
m (1 revision: Imported from TF2 Wiki.)
(Removed {{auto lang cat}} (deprecated).)
 
(24 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{| border="0" style="background-color:white;border-collapse:collapse;" width="100%"
+
<table class="plainlinks ambox {{#ifeq:{{{type|}}}|delete|ambox-delete|}} {{{class|}}}" style="{{{style|}}}"><tr>
| align="{{{align|center}}}|
+
  {{#if:{{{image|}}}
{| border="0" class="ambox-{{{type|notice}}}" style="{{{style|}}}margin: 0.2em;" {{#if:{{{width|}}} | width="{{{width}}}" | width="80%"
+
    |<!-- Image cell --><td class="ambox-image {{#ifeq:{{{type|}}}|notice|ambox-notice|ambox-{{{type|}}}}}">[[File:{{{image}}}{{!}}{{{imagewidth|56px}}}{{!}}{{{imagealt|}}}]]</td>
}}  
+
    |<!-- Blank cell if no image specified --><td class="ambox-empty-cell {{#ifeq:{{{type|}}}|notice|ambox-notice|ambox-{{{type|}}}}}"></td>
|-
+
  }}<td class="ambox-text">{{{contents}}}</td>
| align="left" width="1" {{#if:{{{type|}}} | class="ambox-{{{type|}}}line" | class="ambox-noticeline" }}| &nbsp;
+
  {{#if:{{{image2|}}}
| valign="center" | {{#if:{{{image|}}} | [[Image:{{{image}}}|{{{imagewidth|48px}}}]] | }}
+
    | <td class="ambox-image2">[[File:{{{image2}}}{{!}}{{{image2width|56px}}}{{!}}{{{image2alt|}}}]]</td>
| width="100%" | {{{contents|}}}
+
  }}
|}
+
</tr></table><noinclude>
|}
 
<noinclude>
 
<span class="larger bold">''Warning'': Do <font color="red">NOT</font> edit this Template directly.</span>
 
 
{{Template doc}}
 
{{Template doc}}
[[Category:Maintenance templates|{{PAGENAME}}]]
+
[[Category:Maintenance templates|Ambox]]
 
+
</noinclude>
[[Category:Every page]]</noinclude>
 

Latest revision as of 10:11, 19 August 2011

Template documentation [view] [edit] [history] [purge]

An ambox, or article message box, can be added to notify users of specific messages regarding the article. The {{cleanup}} template is an example of an ambox.

Usage

All parameters

Name Examples Description
Line colors
type type = notice [default] Use the correct value for the message box.
type = style
type = content
type = delete
type = protection
type = images
Images
image Example.png Places an image on the left of the message box.
imagewidth 56px [default] Defines the width of the left image.
imagealt Notice Text to be displayed if image isn't shown properly.
image2 PD-icon.png Places a second image on the right of the message box
image2width 56px [default] Defines the width of the right image.
image2alt Public Domain Text to be displayed if the right image isn't shown properly.
Other
width [deprecated] No longer available
style e.g. font-size: 90%; Takes any valid CSS style.
contents (see below)

Contents

Use {{ambox/message}} in the contents parameter. Example:

{{ambox/message
| 1 = Need some help ova here!
| 2 = This article needs cleaning up.
| 3 = You can help by editing it.
}}

produces...

“Need some help ova here!”
This article needs cleaning up.
You can help by editing it.

Examples

  • Ambox with no image: {{ambox | type = notice | contents = '''Lorem ipsum''' dolor sit amet.}}



  • Ambox with 2 images and custom style:
{{ambox 
| type     = images
| image    = Copyright.png
| image2   = Red copyright.png
| style    = font-family: Georgia, serif;
| contents = '''Lorem ipsum''' dolor sit amet.
}}