Template:Notice/doc: Difference between revisions
m
83 revisions imported: needed for policy template
(HTML comment) |
Reception123 (talk | contribs) m (83 revisions imported: needed for policy template) |
||
(9 intermediate revisions by 4 users not shown) | |||
Line 7:
{{Documentation subpage}}
<!-- PLEASE ADD CATEGORIES WHERE INDICATED AT THE BOTTOM OF THIS PAGE AND INTERWIKIS TO WIKIDATA -->
{{Used in system}}
{{High use| 41371 }}
This is the {{tl|{{BASEPAGENAME}}}} message box. It should be used '''sparingly''' and only for {{#switch:{{BASEPAGENAME}}
|Warning='''important''' warnings about an article or a user that cannot be shown using a more specific template. Please only use it when something is seriously wrong and other people might not otherwise know about it.
|<!--DEFAULT:-->'''significant''' information for which a more specific template doesn't exist.
}} Less important comments should be put as regular text on the page's talk page instead.
== Usage ==
'''<code><nowiki>{{</nowiki>{{BASEPAGENAME}}|1=Place
This box automatically changes its style depending on what kind of page it appears; see {{tl|Mbox}} for details, and view the examples below for demonstrations.
Line 21 ⟶ 22:
=== Use in talk and userspace ===
Outside "important" locations like mainspace, policy pages, and
===Optional parameters ===
The box can be titled with an optional {{para|heading}} (or {{para|header}} or {{para|title}}). This is left-aligned by default. This:<br />
{{in5}}<code><nowiki>{{</nowiki>{{BASEPAGENAME}} |heading=Heading |[[Lorem ipsum|Lorem ipsum]] dolor sit amet...<nowiki>}}</nowiki></code>
produces an all-left notice:
{{{{BASEPAGENAME}}|demospace=main |heading=Heading |style=margin-bottom:2.0em;
It can be hard to notice or read short heading and/or message on a wide monitor when they centered. For long content, it can be centered with {{para|align|center}}.<br />{{small|1=[While {{para|align|right}} is a valid value, it will only be useful when this template is ported to right-to-left language Wikipedias, and shouldn't be used on English Wikipedia or it will be difficult to read.]}}<br />
This:<br />
{{in5}}<code><nowiki>{{</nowiki>{{BASEPAGENAME}} |heading=Heading |align=center |Lorem ipsum dolor sit amet...<nowiki>}}</nowiki></code>
produces:
{{{{BASEPAGENAME}}|demospace=main |heading=Heading |style=margin-bottom:2.0em; |align=center |Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.}}
{{in5}}<code><nowiki>{{</nowiki>{{BASEPAGENAME}} |heading=Heading |center=y |Lorem ipsum dolor sit amet...<nowiki>}}</nowiki></code>
produces
{{{{BASEPAGENAME}}|demospace=main |heading=Heading |style=margin-bottom:2.0em; |center=y
The parameter {{para|textstyle}} can be used to pass arbitrary inline CSS to the main note content. For example, one could center
{{in5}}<code><nowiki>{{</nowiki>{{BASEPAGENAME}} |heading=Heading |textstyle=text-align:center; font-variant:small-caps; |Lorem ipsum dolor sit amet...<nowiki>}}</nowiki></code>
produces
{{{{BASEPAGENAME}}|demospace=main |heading=Heading |style=margin-bottom:2.0em; |textstyle=text-align:center;
Similarly, the parameter {{para|headstyle}} can be used to pass arbitrary inline CSS to the heading content. For example, one could center a red heading above a left-aligned message; this:<br />
{{in5}}<code><nowiki>{{</nowiki>{{BASEPAGENAME}} |heading=Heading |headstyle=text-align:center; color:red; |Lorem ipsum dolor sit amet...<nowiki>}}</nowiki></code>
produces
{{{{BASEPAGENAME}}|demospace=main |heading=Heading |style=margin-bottom:2.0em; |headstyle=text-align:center; color:red;
|