1,776
edits
(split from Template:Ambox) |
(examples) |
||
Line 54: | Line 54: | ||
'''includecat''' parameter disables the tracking category for an instant. This way the template can be used for showcasing without including it to the tracking category. Disables both '''category''' and '''cat2''' parameters. Write "no" to disable the tracking category. | '''includecat''' parameter disables the tracking category for an instant. This way the template can be used for showcasing without including it to the tracking category. Disables both '''category''' and '''cat2''' parameters. Write "no" to disable the tracking category. | ||
== Examples == | |||
=== Simple example === | |||
This is the code for [[Template:Attention]] as of 2 Feb 2024. | |||
<pre>{{Ambox | |||
|type=style | |||
|text='''This article is in need of attention.'''<br> | |||
<small>Please '''[{{SERVER}}{{localurl:{{PAGENAME}}|action=edit}} improve it]''' in any way you see fit.</small> | |||
|category=Pages needing attention | |||
|includecat={{{includecat|<noinclude>no</noinclude>}}} | |||
}}</pre> | |||
The result is as follows: | |||
{{Ambox | |||
|type=style | |||
|text='''This article is in need of attention.'''<br> | |||
<small>Please '''[{{SERVER}}{{localurl:{{PAGENAME}}|action=edit}} improve it]''' in any way you see fit.</small> | |||
|category=Pages needing attention | |||
|includecat=no | |||
}} | |||
Here, the parameter '''includecat''' is introduced in the new template if needed for showcasing. The formulation <pre>{{{includecat|<noinclude>no</noinclude>}}}</pre> prevents the template itself from being added to the tracking category. | |||
=== Stacking === | |||
The message boxes can be used alone, as is done in every example above. If you wish to use multiple message boxes in a single page, they will stack if placed below one another. | |||
<pre>{{Name}} | |||
{{Attention}} | |||
{{UC}}</pre> | |||
{{Name|includecat=no}} | |||
{{Attention|includecat=no}} | |||
{{UC|includecat=no}} | |||
<includeonly>[[Category:Wiki System Templates]]__NOTOC__</includeonly> | <includeonly>[[Category:Wiki System Templates]]__NOTOC__</includeonly> | ||
<noinclude>[[Category:Documentation subpages]]</noinclude> | <noinclude>[[Category:Documentation subpages]]</noinclude> |
edits