Template:Ambox/doc: Difference between revisions
From Celeste Wiki
m
removed documentation subpage template and some red links
m (1 revision imported: Importing general purpose templates) |
m (removed documentation subpage template and some red links) |
||
(One intermediate revision by the same user not shown) | |||
Line 1:
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
This is the {{Tl|Ambox}} or '''Article message box''' meta-template.
It is used to build ''article message box'' templates such as
See [[wp:Template:Ambox]].
== Common parameters ==
The box on the right shows the most common parameters
{| class="wikitable" align="right" style="background:transparent; width=40%"
!Common parameters
Line 35 ⟶ 34:
This parameter should be updated if the template is ever moved. The purpose of this parameter is twofold:
* If incorrectly
* It allows the template to have a more useful display on its template page, for example to show the date even when not specified, and to apply categorisation of the template itself.
=== ''subst'' ===
The ''subst'' parameter allows the meta-template to detect whether the template has been incorrectly substituted, and give an appropriate warning. It will also add such pages to
=== ''small'' ===
Line 49 ⟶ 48:
Other variations:
* For templates which should ''never'' be small, specify {{para|small|no}} or do not pass the small parameter at all.
* For templates which should ''always'' be small,
* For templates which should ''default to small'', try {{para|small|<nowiki>{{{small|left}}}</nowiki>}}. This will allow an editor to override by using {{para|small|no}} on an article.
=== ''type'' ===
The ''type'' parameter defines the colour of the left bar
{{Ambox
|nocat=true
| type = speedy
| text = type=<u>speedy</u> – Speedy deletion issues
}}
{{Ambox
|nocat=true
| type = delete
| text = type=<u>delete</u> – Deletion issues
}}
{{Ambox
|nocat=true
| type = content
| text = type=<u>content</u> – Content issues
}}
{{Ambox
|nocat=true
| type = style
| text = type=<u>style</u> – Style issues
}}
{{ambox
|nocat=true
| type = notice
| text = type=<u>notice</u> – Article notices
}}
{{Ambox
|nocat=true
| type = move
| text = type=<u>move</u> – Merge, split and transwiki proposals
}}
{{Ambox
|nocat=true
| type = protection
| text = type=<u>protection</u> – Protection notices
}}
Line 93 ⟶ 92:
=== ''image'' ===
You can choose a specific image to use for the template by using the ''image'' parameter. Images are specified using the standard syntax for inserting files in Wikipedia
Please note:
* If no image is specified then the default image corresponding to the ''type'' is used. (See [[#type]] above.)
* If {{para|image|none}} is specified, then no image is used and the text uses the whole message box area.
* If an icon is
=== ''sect'' ===
Line 127 ⟶ 120:
This parameter may then be used by an editor as follows:
* {{para|talk|SECTION HEADING}} - the link will point to the specified section on the article's talk page, e.g. {{para|talk|Foo}}
* {{para|talk|FULL PAGE NAME}} - the template will link to the page specified (which may include a
Notes:
Line 143 ⟶ 136:
* articles will be placed in '''Category:CATEGORY from DATE''' if {{para|date|DATE}} is specified.
* articles will be placed in '''Category:CATEGORY''' if the date is not specified.
=== ''all'' ===
Line 193 ⟶ 184:
=== ''class'' ===
A custom
=== ''style'' and ''textstyle'' ===
Line 210 ⟶ 201:
== Technical notes ==
* This meta-template uses the ambox CSS classes in [[MediaWiki:Common.css]]. The classes can also be used directly in a
* If you need to use special characters in the text parameter then you need to escape them like this:
<pre>
Line 233 ⟶ 224:
* This template uses CSS classes in [[MediaWiki:Common.css]] for most of its looks, thus it is fully skinnable.
* This template calls {{Tl|Ambox/core}} or {{w|Template:ambox/small|ambox/small}} which holds most of the code for {{Tl|Ambox}}, while {{Tl|Ambox}} itself does parameter preprocessing.
* Internally, this meta-template uses HTML markup instead of wikimarkup for the table code. That is the usual way meta-templates are made, since wikimarkup has several drawbacks. For instance, it makes it harder to use
* The default images for this meta-template are in png format instead of svg format. The main reason is that some older web browsers have trouble with the transparent background that MediaWiki renders for svg images. The png images here have hand optimised transparent background colour so they look good in all browsers. Note that svg icons only look somewhat bad in the old browsers, thus such hand optimisation is only worth the trouble for very widely used icons.
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox||
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS -->
[[Category:Templates|*]]
[[Category:
}}</includeonly>
|