Vorlage:Cmbox/Doku: Unterschied zwischen den Versionen

Documentation complete.
imported>Davidgothberg
(Adding more documentation. Intermediate save.)
imported>Davidgothberg
(Documentation complete.)
Zeile 7: Zeile 7:
It is used to create message box templates for category pages, such as {{tl|CatDiffuse}} etc. It offers several different colours, uses default images if no image parameter is given and it has some other features.
It is used to create message box templates for category pages, such as {{tl|CatDiffuse}} etc. It offers several different colours, uses default images if no image parameter is given and it has some other features.


This template works exactly like {{tl|ambox}} and uses the same parameters, see full documentation there.  
This template works almost exactly like {{tl|ambox}} and uses the same parameters.


=== Suggested style standard ===
=== Suggested style standard ===
Zeile 157: Zeile 157:
:An optional [[Cascading Style Sheets|CSS]] value used by the text cell. For example:
:An optional [[Cascading Style Sheets|CSS]] value used by the text cell. For example:
::<code>textstyle = text-align: center;</code>
::<code>textstyle = text-align: center;</code>


=== Technical details ===
=== Technical details ===


This template currently uses hard coded styles. Later it will use CSS classes enabling it to be skinned.
This template currently uses hard coded styles. Later it will use CSS classes enabling it to be skinned.
If you need to use special characters in the text parameter then you need to escape them like this:
<pre>
{{cmbox
| text  = <div>
Equal sign = and a start and end brace { } work fine as they are.
But here is a pipe {{!}} and two end braces &lt;nowiki>}}&lt;/nowiki>.
And now a pipe and end braces &lt;nowiki>|}}&lt;/nowiki>.
</div>
}}
</pre>
{{cmbox
| 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>
}}
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.
For more technical details see the [[{{TALKPAGENAME}}|talk page]]. Since this template works almost exactly like {{tl|ambox}} and {{tl|imbox}} their talk pages and related pages might also contain more details.


=== See also ===
=== See also ===
Anonymer Benutzer