Template:Ambox/doc

From Lotro-Wiki.com
Jump to navigation Jump to search
This is the template documentation for {{Ambox}}. It is transcluded from Template:Ambox/doc and may be directly edited there.

This is the {{Ambox}} or Article message box meta-template.

It is used to build Article Management Tag templates such as {{Delete Page}}. It offers several different colours, uses default images if no image parameter is given, and has some other features.

  • NOTE: This template is(was) copied directly from en.wikipedia.org, NOT mediawiki.org and therefore most of the references below simply do not exist on Lotro-Wiki.com.

Common parameters

The box on the right shows the most common parameters that are accepted by {{ambox}}. The purpose of each is described below.

{{Ambox
| name  = 
| subst = <includeonly>{{subst:substcheck}}</includeonly>
| small = {{{small|}}}
| type  = 
| image = 
| sect  = {{{1|}}}
| issue = 
| talk  = {{{talk|}}}
| fix   = 
| date  = {{{date|}}}
| cat   = 
| all   = 
}}

small

The small parameter should be passed through the template, as this will allow editors to use the small format by specifying "| small=left" on an article:

Otherwise the standard format will be produced:

Other variations:

  • For templates which should never be small, specify "| small=no" or do not pass the small parameter at all.
  • For templates which should always be small, just specify "| small=left".
  • For templates which should default to small, try "| small={{{small|left}}}". This will allow an editor to override by using "| small=no" on an article.

type

The type parameter defines the colour of the left bar, and the image that is used by default. The type is chosen not on aesthetics but is based on the type of issue that the template describes. The seven available types and their default images are shown below.

If no type parameter is given the template defaults to "| type=notice".

CSS

  • MediaWiki:Common.css contains the following section:
/* Article message box template styles */
table.ambox {
    margin: 0 10%;                       /* Will not overlap with other elements */
    border-collapse: collapse; 
    background: #fbfbfb; 
    border: 1px solid #aaa; 
    border-left: 10px solid #1e90ff;     /* Default "notice" blue */
}
table.ambox th.ambox-text, table.ambox td.ambox-text {      /* The message body cell(s) */
    padding: 0.25em 0.5em;            /* 0.5em left/right */
    width: 100%;                      /* Make all templates the same width regardless of text size */
}
table.ambox td.ambox-image {          /* The left image cell */
    padding: 2px 0px 2px 0.5em;       /* 0.5em left, 0px right */
    text-align: center; 
}
table.ambox td.ambox-imageright {     /* The right image cell */
    padding: 2px 4px 2px 0px;         /* 0px left, 4px right */
    text-align: center; 
}
table.ambox-notice {
    border-left: 10px solid #1e90ff;     /* Blue */
/* border-right: 10px solid #1e90ff; */  /* If you want two blue bars */
}
table.ambox-delete,
table.ambox-serious {
    border-left: 10px solid #b22222;     /* Red */
}
table.ambox-content {
    border-left: 10px solid #f28500;     /* Orange */
}
table.ambox-style {
    border-left: 10px solid #f4c430;     /* Yellow */
}
table.ambox-merge {
    border-left: 10px solid #9932cc;     /* Purple */
}
table.ambox-protection {
    border-left: 10px solid #bba;        /* Gray */
}
table.ambox.ambox-mini {                 /* small floating box variant */
    float: right;
    clear: right;
    margin: 0 0 0 1em;
    width: 25%;
}