Templat:Ambox
Templat ini digunakan pada 1.430.000+ halaman, atau sekira 18905% dari keseluruhan halaman halaman. Untuk mencegah suntingan mengganggu skala besar dan beban peladen, setiap perubahan perlu diuji di subhalaman /bak pasir atau /kasus uji templat, atau subhalaman pengguna Anda. Perubahan yang diuji dapat ditambahkan ke halaman ini dalam satu suntingan. Pertimbangkan untuk mendiskusikan perubahan di halaman pembicaraan sebelum mengimplementasikannya. |
Templat ini menggunakan Lua: |
Templat-templat kotak pesan | |
---|---|
templat | context |
{{Ambox}} | artikel |
{{Cmbox}} | kategori |
{{Imbox}} | gambar |
{{Tmbox}} | pembicaraan |
{{Fmbox}} | footer / header |
{{Ombox}} | halaman lain |
{{Mbox}} | auto-detect |
{{Asbox}} | stub artikel |
{{Dmbox}} | disambiguasi |
This is the {{Ambox}} ([A]rticle [m]essage [box]) metatemplate.
It is used to build article message box templates such as {{Underlinked}}. It offers several different colours, uses default images if no image parameter is given, and has some other features.
Other parameters[sunting sumber]
The "All parameters" box shows all possible parameters for this template. However, it is not recommended to copy this, because it will never be required to use all parameters simultaneously.
All parameters |
---|
{{Ambox | name = | subst = <includeonly>{{subst:substcheck}}</includeonly> | small = {{{small|}}} | type = | image = | imageright = | smallimage = | smallimageright = | class = | style = | textstyle = | sect = {{{1|}}} | issue = | talk = {{{talk|}}} | fix = | date = {{{date|}}} | text = | smalltext = | plainlinks = no | removalnotice = | cat = | all = | cat2 = | all2 = | cat3 = | all3 = }}<noinclude> {{Documentation}} </noinclude> |
imageright[sunting sumber]
An image on the right side of the message box may be specified using this parameter. The syntax is the same as for the image parameter, except that the default is no image.
smallimage and smallimageright[sunting sumber]
Images for the small format box may be specified using these parameters. They will have no effect unless |small=left
is specified.
class[sunting sumber]
A custom CSS class to apply to the box.
style and textstyle[sunting sumber]
Optional CSS values may be defined, without quotation marks " "
but with the ending semicolons ;
.
- style specifies the style used by the entire message box table.
- textstyle relates to the text cell.
text and smalltext[sunting sumber]
Instead of specifying the issue and the fix it is possible to use the text parameter instead.
Customised text for the small format can be defined using smalltext.
plainlinks[sunting sumber]
Normally on Wikipedia, external links have an arrow icon next to them, like this: Example.com. However, in message boxes, the arrow icon is suppressed by default, like this: Example.com. To get the normal style of external link with the arrow icon, use |plainlinks=no
.
cat2, cat3, all2, and all3[sunting sumber]
- cat2 and cat3 provide for additional monthly categories; see #cat.
- all2 and all3 provide for additional categories into which all articles are placed, just like #all.
Technical notes[sunting sumber]
- This meta-template uses the ambox CSS classes in MediaWiki:Common.css. The classes can also be used directly in a wikitable if special functionality is needed. See the how-to guide for that.
- If you need to use special characters in the text parameter then you need to escape them like this:
{{Ambox | text = <div> Equal sign = and a start and end brace { } work fine as they are. But here is a pipe | and two end braces <nowiki>}}</nowiki>. And now a pipe and end braces <nowiki>|}}</nowiki>. </div> }}
Equal sign = and a start and end brace { } work fine as they are. But here is a pipe | and two end braces }}. And now a pipe and end braces |}}. |
- The
<div>
tags that surround the text in the example above are usually not needed. But if the text contains line breaks then sometimes we get weird line spacing. This especially happens when using vertical dotted lists. Then use the div tags to fix that. - This template uses CSS classes in MediaWiki:Common.css for most of its looks, thus it is fully skinnable.
- This template calls Modul:Message box which holds most of the code for {{Ambox}}, while {{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 parser functions and some special characters in parameters.
- 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.
- For more technical details see the talk page and the "See also" links below. Since this template works almost exactly like {{Tmbox}}, {{Imbox}}, {{Cmbox}} and {{Ombox}} their talk pages and related pages might also contain more details.
Lihat juga[sunting sumber]
Templat:Templat Mbox lihat juga Halaman lain:
- Wikipedia:Ambox CSS classes – Describes how to use the ambox CSS classes directly in wikitables and HTML tables.
- Wikipedia:Article message boxes – The style guideline for creating article message boxes.
- Pembicaraan Wikipedia:Article message boxes – For discussion about these matters.
Dokumentasi di atas ditransklusikan dari Templat:Ambox/doc. (sunting | versi terdahulu) Penyunting dapat melakukan uji coba pada halaman bak pasir (buat | cermin) dan kasus uji (buat) templat ini. Mohon tambahkan kategori pada subhalaman /doc. Subhalaman templat ini. |