Vorlage:Tmbox/Doku: Unterschied zwischen den Versionen

Updated the documentation a lot. Added the small parameters. Intermediate save.
imported>Davidgothberg
imported>Davidgothberg
(Updated the documentation a lot. Added the small parameters. Intermediate save.)
Zeile 1: Zeile 1:
{{Documentation subpage}}
{{Documentation subpage}}
<includeonly>{{intricate template}}</includeonly>
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->


This is the {{tl|tmbox}} or '''talk page message box''' meta-template.
This is the {{tl|tmbox}} or '''talk page message box''' meta-template.


It is used to build message box templates for talk pages.
It is used to build message box templates for talk pages, such as {{tl|central}} etc. It offers several different colours, uses default images if no image parameter is given and it has some other features.


This template works similarly to {{tl|ambox}} and uses the same parameters.
This template works similarly to {{tl|ambox}} and uses the same parameters.
Zeile 94: Zeile 95:
| textstyle = CSS value
| textstyle = CSS value
| text  = The message body text.  
| text  = The message body text.  
| small = yes
| smallimage = none / [[Image:Some image.svg|30px]]
| smallimageright = none / [[Image:Some image.svg|30px]]
| smalltext  = A shorter message body text.
}}
}}
</pre>
</pre>
Zeile 122: Zeile 127:
'''text'''
'''text'''
:The message body text.
:The message body text.
==== The small parameters ====
{{tmbox
| small = yes
| text = small=yes
}}
'''small'''
:'''yes''' = Makes it a smaller right floating message box. This also makes the default images smaller. Note that any data fed to the '''smallimage''', '''smallimageright''' and '''smalltext''' parameters is only used if "small=yes". To make it so your template also understands the small parameter you can use this code:
::<code><nowiki>small = {{{small|}}}</nowiki></code>
'''smallimage'''
:'''No parameter''' = If no '''smallimage''' parameter is given then this template falls back to use the '''image''' parameter. If the '''image''' parameter also is empty then a small default image is used.
:'''An image''' = Should be an image with usual wiki notation. 30px width are usually about right. For example:
::<code><nowiki>image = [[Image:Crystal package settings.png|30px]]</nowiki></code>
:'''none''' = Means that no image is used. This overrides any image fed to '''image''', when "small=yes".
'''smallimageright'''
:'''No parameter''' = If no '''smallimageright''' parameter is given then this template falls back to use the '''imageright''' parameter. If the '''imageright''' parameter also is empty then no image is shown on the right side.
:'''An image''' = Should be an image with usual wiki notation. 30px width are usually about right. For example:
::<code><nowiki>imageright = [[Image:Nuvola apps bookcase.png|30px]]</nowiki></code>
:'''Anything''' = Any other object that you want to show on the right side.
:'''none''' = Means that no right side image is used. This overrides any image fed to '''imageright''', when "small=yes".
'''smalltext'''
:A shorter version of the message body text. If no '''smalltext''' parameter is given then this template falls back to use the '''text''' parameter.


=== Technical details ===
=== Technical details ===
Zeile 146: Zeile 177:
</div>
</div>
}}
}}
This template calls {{tl|tmbox/core}} which holds most of the code for {{tl|tmbox}}, while {{tl|tmbox}} itself does parameter preprocessing.


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