Vorlage:Ambox/Doku: Unterschied zwischen den Versionen

add class parameter
imported>Edokter
(add class parameter)
Zeile 128: Zeile 128:
<pre>
<pre>
{{ambox
{{ambox
| name = Name of template without the Template: part
| name       = Name of template without the Template: part
| subst = <includeonly>{{subst:</includeonly><includeonly>substcheck}}</includeonly>
| subst       = <includeonly>{{subst:</includeonly><includeonly>substcheck}}</includeonly>
| type = speedy / delete / content / style / notice / move / protection
| type       = speedy / delete / content / style / notice / move / protection
| image = none / [[File:...|40px|...]]
| image       = none / [[File:...|40px|...]]
| imageright = [[File:...|40px|...]]
| imageright = [[File:...|40px|...]]
| style = CSS values
| class      = A custom CSS class to apply to the box
| textstyle = CSS values
| style       = CSS values
| text = The message body text.
| textstyle   = CSS values
| small = {{{small|}}} / left
| text       = The message body text.
| smallimage = none / [[File:...|20px|...]]
| small       = {{{small|}}} / left
| smallimage = none / [[File:...|20px|...]]
| smallimageright = none / [[File:...|20px|...]]
| smallimageright = none / [[File:...|20px|...]]
| smalltext  = A shorter message body text.
| smalltext  = A shorter message body text.
Zeile 261: Zeile 262:
This template calls {{tl|ambox/core}} which holds most of the code for {{tl|ambox}}, while {{tl|ambox}} itself does parameter preprocessing.
This template calls {{tl|ambox/core}} which holds most of the code for {{tl|ambox}}, while {{tl|ambox}} itself does parameter preprocessing.


Internally this meta-template uses HTML wikimarkup instead of wikimarkup for the table code. That is the usual way we make meta-templates since wikimarkup has several drawbacks. For instance it makes it harder to use [[m:Help:ParserFunctions|parser functions]] and some special characters in parameters.
Internally this meta-template uses HTML markup instead of wikimarkup for the table code. That is the usual way we make meta-templates since wikimarkup has several drawbacks. For instance it makes it harder to use [[m:Help:ParserFunctions|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.
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.