Difference between revisions of "Template:Ambox"

From Bronies.wiki
Jump to navigation Jump to search
(Created page with "{| class="box ambox {{#if: {{{section|}}} | section }} {{#if: {{{classes|}}} | {{{classes}}} }}" cellspacing="0" cellpadding="0" |class="ambox__icon" width="50"|File:{{{icon...")
 
(Change date format.)
 
(One intermediate revision by the same user not shown)
Line 2: Line 2:
 
|class="ambox__icon" width="50"|[[File:{{{icon|Bronieswiki_logo.svg}}}|50px|link=]]
 
|class="ambox__icon" width="50"|[[File:{{{icon|Bronieswiki_logo.svg}}}|50px|link=]]
 
|{{{message|Main ambox copy goes here. Manually bold the important bits, and add links to relevant help articles.}}}
 
|{{{message|Main ambox copy goes here. Manually bold the important bits, and add links to relevant help articles.}}}
{{#if: {{{date|}}} | <small>(Added: {{#time:Y F j|{{{date}}}}})</small> }}
+
{{#if: {{{date|}}} | <small>(Added: {{#time:F j, Y|{{{date}}}}})</small> }}
 
|}<noinclude>{{Documentation}}</noinclude>
 
|}<noinclude>{{Documentation}}</noinclude>

Latest revision as of 15:04, 3 October 2020

Bronieswiki logo.svg Main ambox copy goes here. Manually bold the important bits, and add links to relevant help articles.
This documentation is transcluded from Template:Ambox/doc and needs to be edited separately.

An ambox, short for article message box, is a metatemplate (a template that is used by other templates) for messaging templates in the main article namespace. Examples of common amboxes include {{merge}}, {{cleanup}}, and {{unreferenced}}.

Usage

Amboxes should never be used directly within an article. Instead, it should be used to create templates appropriate to the need.

Amboxes accept these parameters:

classes - Additional CSS classes to apply to the ambox. Most commonly used to apply color themes.

date - The date the ambox was added to the page. Preferably in YYYY-MM-DD format.

icon - An image file to display within the ambox. The surrounding wikicode and File: prefix are not required, only the image's filename.

message - The text the ambox displays. This is unformatted text by default, allowing templates to bold, italicise and add links where useful.

section - Whether this ambox only applies to a section, rather than at the top of an article page. This is a boolean property. If it evaluates to true, a smaller, left-aligned variant of the ambox will be used. It is false by default.