Template:Notice
| {{#if: |[[File:{{{image}}}|40px|Notice|alt=]]}} | {{#if: | ' }}{{{1}}} | {{#if: |{{{imageright}}} |{{#if: |Error: no shortcuts were specified and the |msg= parameter was not set.}} }} |
{{#ifeq:Template:Editnotices|{{ safesubst:#if:
| {{ safesubst:#titleparts:{{ safesubst:#if:|{{{1}}}|Template:Notice}}|1}}
| {{ safesubst:#if:|{{{1}}}|Template:Notice}}
}}|}}
{{#ifeq: Notice | Notice |
}} {{#ifeq:notice |doc
|
{{#ifeq:show |show
|| icon | This is a documentation subpage for Template:Terminate sentence It may contain usage information, categories and other content that is not part of the original {{#if: |{{{text2}}} |{{#if: |{{{text1}}} |{{#ifeq:Template |User |template template page |{{#if:Template |template page|article}}}}}}}}. |
}}{{#if:|
|{{#ifexist:Template:Notice
| [[Category:{{#switch:Template |Template=Template |Module=Module |User=User |#default=Wikipedia}} documentation pages]]
|
}}
}}
|
}}
Lua error in Module:Effective_protection_level at line 64: attempt to index field 'ext' (a nil value).
| File:Information icon4.svg | This template {{#switch:never|may=may be substituted|never=should not be substituted||#default=should always be substituted – use {{#switch:
{{#if:
| {{{demospace}}}
| {{#ifeq:Template|Template
| template
| other
}}
}}
| template = |no |n |f |false |off |0 = | = |¬ = |yes |y |t |true |on |1 = yes |#default = yes }} |Any accidental transclusions will be automatically substituted by a bot.{{#if:{{safesubst:#switch: |no |n |f |false |off |0 = | = |¬ = |yes |y |t |true |on |1 = yes |#default = yes}}||{{#switch:Notice|doc|sandbox=|}}}}}} {{#if: |For transcluding, use {{[[Template:|]]}} instead.}} |
|no |n |f |false |off |0 = | = |¬ = |yes |y |t |true |on |1 = yes |#default = yes
}}||{{#switch:Notice|doc|sandbox=|{{#switch:never |never= |may= |#default={{#ifexpr: 0Template:Find page text > 0 | }} }}}}}} {{#ifeq: Notice | Notice |
}} This is the {{Notice}} message box. It should be used sparingly and only for {{#switch:Notice
|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. |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
{{Notice|1=Place notice text here.|heading=Optional heading above the text}}
This box automatically changes its style depending on what kind of page it appears; see {{Mbox}} for details, and view the examples below for demonstrations.
Use in talk and userspace
Outside "important" locations like mainspace, policy pages, and noticeboards, this message box can also be used on other pages in a more relaxed way, such as on the top of talk page alerts, WikiProject pages, userspace pages, etc. Talk and noticeboard cases should probably include your signature at the end of the template's main content.
Optional parameters
The box can be titled with an optional |{{SAFESUBST:#if:heading|heading=}} (or |{{SAFESUBST:#if:header|header=}} or |{{SAFESUBST:#if:title|title=}}). This is left-aligned by default. This:
{{Notice |heading=Heading |Lorem ipsum dolor sit amet...}}
produces an all-left notice:
{{#if: |[[File:{{{image}}}|40px|Notice|alt=]]}} | {{#if:Heading | Heading }}Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. | {{#if: |{{{imageright}}} |{{#if: |Error: no shortcuts were specified and the |msg= parameter was not set.}} }} |
| {{ safesubst:#titleparts:{{ safesubst:#if:|{{{1}}}|Template:Notice}}|1}}
| {{ safesubst:#if:|{{{1}}}|Template:Notice}}
}}|}}
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 |{{SAFESUBST:#if:align|align=}}center.
[While |{{SAFESUBST:#if:align|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.]{{SAFESUBST:#if:[While |{{SAFESUBST:#if:align|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.]||}}
This:
{{Notice |heading=Heading |align=center |Lorem ipsum dolor sit amet...}}
produces:
{{#if: |[[File:{{{image}}}|40px|Notice|alt=]]}} | {{#if:Heading | Heading }}Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. | {{#if: |{{{imageright}}} |{{#if: |Error: no shortcuts were specified and the |msg= parameter was not set.}} }} |
| {{ safesubst:#titleparts:{{ safesubst:#if:|{{{1}}}|Template:Notice}}|1}}
| {{ safesubst:#if:|{{{1}}}|Template:Notice}}
}}|}}
A shorthand parameter to center the heading and main text at the same time is |{{SAFESUBST:#if:center|center=}}y. This:
{{Notice |heading=Heading |center=y |Lorem ipsum dolor sit amet...}}
produces:
{{#if: |[[File:{{{image}}}|40px|Notice|alt=]]}} | {{#if:Heading | Heading }}Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. | {{#if: |{{{imageright}}} |{{#if: |Error: no shortcuts were specified and the |msg= parameter was not set.}} }} |
| {{ safesubst:#titleparts:{{ safesubst:#if:|{{{1}}}|Template:Notice}}|1}}
| {{ safesubst:#if:|{{{1}}}|Template:Notice}}
}}|}}
The parameter |{{SAFESUBST:#if:textstyle|textstyle=}} can be used to pass arbitrary inline CSS to the main note content. For example, one could center small-caps text below a left-aligned heading; this:
{{Notice |heading=Heading |textstyle=text-align:center; font-variant:small-caps; |Lorem ipsum dolor sit amet...}}
produces:
{{#if: |[[File:{{{image}}}|40px|Notice|alt=]]}} | {{#if:Heading | Heading }}Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. | {{#if: |{{{imageright}}} |{{#if: |Error: no shortcuts were specified and the |msg= parameter was not set.}} }} |
| {{ safesubst:#titleparts:{{ safesubst:#if:|{{{1}}}|Template:Notice}}|1}}
| {{ safesubst:#if:|{{{1}}}|Template:Notice}}
}}|}}
Similarly, the parameter |{{SAFESUBST:#if:headstyle|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:
{{Notice |heading=Heading |headstyle=text-align:center; color:red; |Lorem ipsum dolor sit amet...}}
produces:
{{#if: |[[File:{{{image}}}|40px|Notice|alt=]]}} | {{#if:Heading | Heading }}Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. | {{#if: |{{{imageright}}} |{{#if: |Error: no shortcuts were specified and the |msg= parameter was not set.}} }} |
| {{ safesubst:#titleparts:{{ safesubst:#if:|{{{1}}}|Template:Notice}}|1}}
| {{ safesubst:#if:|{{{1}}}|Template:Notice}}
}}|}}
The message box can also take an |{{SAFESUBST:#if:image|image=}} parameter (with a value of just the bare filename of the image, without File:..., Image:..., or markup), but this is discouraged in articles. For an example of its use, see below.
See #Talk pages, below for the talkpage-only |{{SAFESUBST:#if:small|small=}}y parameter. See also #Adding an image, shortcuts, etc., on the righthand side for additional parameters that work in talk and project pages but not articles.
Articles
{{Notice |Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.}}produces:
{{#if: |[[File:{{{image}}}|40px|Notice|alt=]]}} | {{#if: | ' }}Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. | {{#if: |{{{imageright}}} |{{#if: |Error: no shortcuts were specified and the |msg= parameter was not set.}} }} |
| {{ safesubst:#titleparts:{{ safesubst:#if:|{{{1}}}|Template:Notice}}|1}}
| {{ safesubst:#if:|{{{1}}}|Template:Notice}}
}}|}}
Talk pages
On talk pages, {{Notice |Lorem ipsum dolor sit amet...}} produces:
| {{#if: |[[File:{{{image}}}|40px|Notice|alt=]]}} | {{#if: | ' }}Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. | {{#if: |{{{imageright}}} |{{#if: |Error: no shortcuts were specified and the |msg= parameter was not set.}} }} |
| {{ safesubst:#titleparts:{{ safesubst:#if:|{{{1}}}|Template:Notice}}|1}}
| {{ safesubst:#if:|{{{1}}}|Template:Notice}}
}}|}}
You may also set the talkpage-only parameter |{{SAFESUBST:#if:small|small=}}yes, which alters the template's appearance thus:
| {{#if: |[[File:{{{image}}}|30px|Notice|alt=]]}} | {{#if:Header | Header }}Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. | {{#if: |{{{imageright}}} |{{#if: |Error: no shortcuts were specified and the |msg= parameter was not set.}} }} |
| {{ safesubst:#titleparts:{{ safesubst:#if:|{{{1}}}|Template:Notice}}|1}}
| {{ safesubst:#if:|{{{1}}}|Template:Notice}}
}}|}}
{{Notice |small=yes |header=Header |style=text-align:center; |Lorem ipsum dolor sit amet...}}produces ......
Setting the |{{SAFESUBST:#if:image|image=}} parameter changes the image shown on the lefthand side of the template.
{{Notice |image=Codex icon InfoFilled blue.svg |heading=Heading |Lorem ipsum dolor sit amet...}}{{Notice |image=Codex icon Clock blue.svg |heading=Heading |Lorem ipsum dolor sit amet...}}produces:
{{#if:Codex icon InfoFilled blue.svg |File:Codex icon InfoFilled blue.svg}} | {{#if:Heading | Heading }}Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. | {{#if: |{{{imageright}}} |{{#if: |Error: no shortcuts were specified and the |msg= parameter was not set.}} }} |
| {{ safesubst:#titleparts:{{ safesubst:#if:|{{{1}}}|Template:Notice}}|1}}
| {{ safesubst:#if:|{{{1}}}|Template:Notice}}
}}|}}
{{#if:Codex icon Clock blue.svg |File:Codex icon Clock blue.svg}} | {{#if:Heading | Heading }}Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. | {{#if: |{{{imageright}}} |{{#if: |Error: no shortcuts were specified and the |msg= parameter was not set.}} }} |
| {{ safesubst:#titleparts:{{ safesubst:#if:|{{{1}}}|Template:Notice}}|1}}
| {{ safesubst:#if:|{{{1}}}|Template:Notice}}
}}|}}
(Note the effect of omitting |{{SAFESUBST:#if:style|style=}}text-align:center; here)
File and category pages
{{Notice |Lorem ipsum dolor sit amet...}} on a File: page would produce... | {{ safesubst:#titleparts:{{ safesubst:#if:|{{{1}}}|Template:Notice}}|1}}
| {{ safesubst:#if:|{{{1}}}|Template:Notice}}
}}|}} ... and, on a Category: page, would produce: | {{ safesubst:#titleparts:{{ safesubst:#if:|{{{1}}}|Template:Notice}}|1}}
| {{ safesubst:#if:|{{{1}}}|Template:Notice}}
}}|}}
Other pages
On other pages, such as those in the User:, Wikipedia: and Help: namespaces, {{Notice |Lorem ipsum dolor sit amet...}} would produce:
| {{#if: |[[File:{{{image}}}|40px|Notice|alt=]]}} | {{#if: | ' }}Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. | {{#if: |{{{imageright}}} |{{#if: |Error: no shortcuts were specified and the |msg= parameter was not set.}} }} |
| {{ safesubst:#titleparts:{{ safesubst:#if:|{{{1}}}|Template:Notice}}|1}}
| {{ safesubst:#if:|{{{1}}}|Template:Notice}}
}}|}}
External links and equals signs
In most cases, external links can be used in the template without any complications. If a link – or any text – contains one or more equals signs (" = "), however, everything before the first sign will be interpreted as the name of a parameter. To prevent this, name the text carrying the link as the first numbered parameter:
{{Notice |1=Any text/links including "=" should now be interpreted correctly.}}produces:
| {{#if: |[[File:{{{image}}}|40px|Notice|alt=]]}} | {{#if: | ' }}Any text/links including "=" should now be interpreted correctly. | {{#if: |{{{imageright}}} |{{#if: |Error: no shortcuts were specified and the |msg= parameter was not set.}} }} |
| {{ safesubst:#titleparts:{{ safesubst:#if:|{{{1}}}|Template:Notice}}|1}}
| {{ safesubst:#if:|{{{1}}}|Template:Notice}}
}}|}}
Adding an image, shortcuts, etc., on the righthand side
To add shortcuts, images, other templates, etc. to the righthand side of the template, use |{{SAFESUBST:#if:imageright|imageright=}}. This does not work in articles. For example,{{Notice |imageright=[[File:Wiki letter w.svg|40px]] |Lorem ipsum dolor sit amet...}} produces:
| {{#if: |[[File:{{{image}}}|40px|Notice|alt=]]}} | {{#if: | ' }}Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. | {{#if:File:Wiki letter w.svg |File:Wiki letter w.svg |{{#if: |Error: no shortcuts were specified and the |msg= parameter was not set.}} }} |
| {{ safesubst:#titleparts:{{ safesubst:#if:|{{{1}}}|Template:Notice}}|1}}
| {{ safesubst:#if:|{{{1}}}|Template:Notice}}
}}|}}
{{Notice |imageright={{Shortcuts|You|Me}} |Lorem ipsum dolor sit amet...}} includes the {{Shortcut}}s template providing links to You and Me:
| {{#if: |[[File:{{{image}}}|40px|Notice|alt=]]}} | {{#if: | ' }}Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. | {{#if: | |{{#if: |Error: no shortcuts were specified and the |msg= parameter was not set.}} }} |
| {{ safesubst:#titleparts:{{ safesubst:#if:|{{{1}}}|Template:Notice}}|1}}
| {{ safesubst:#if:|{{{1}}}|Template:Notice}}
}}|}}
Alternate shortcut option
As an alternative to imageright, the |{{SAFESUBST:#if:shortcut|shortcut=}} (or |{{SAFESUBST:#if:shortcut1|shortcut1=}}) and |{{SAFESUBST:#if:shortcutN|shortcutN=}} parameters (where N = 2 to 5) may be used to display shortcuts. For instance, {{Notice |shortcut1=One |shortcut2=Two |shortcut3=Three |shortcut4=Four |shortcut5=Five |Lorem ipsum dolor sit amet...}} produces:
| {{#if: |[[File:{{{image}}}|40px|Notice|alt=]]}} | {{#if: | ' }}Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. | {{#if: |{{{imageright}}} |{{#if:One | }} }} |
| {{ safesubst:#titleparts:{{ safesubst:#if:|{{{1}}}|Template:Notice}}|1}}
| {{ safesubst:#if:|{{{1}}}|Template:Notice}}
}}|}}
Note: If both imageright and any of the shorcut parameters are used, the contents of imageright will override the shortcut/s. For example,{{Notice |imageright=[[File:Wiki letter w.svg|40px]] |shortcut1=Horse |shortcut2=Dog |shortcut3=Pig |shortcut4=Cow |shortcut5=Umbrella |Lorem ipsum dolor sit amet...}} produces:
| {{#if: |[[File:{{{image}}}|40px|Notice|alt=]]}} | {{#if: | ' }}Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. | {{#if:File:Wiki letter w.svg |File:Wiki letter w.svg |{{#if:Horse | }} }} |
| {{ safesubst:#titleparts:{{ safesubst:#if:|{{{1}}}|Template:Notice}}|1}}
| {{ safesubst:#if:|{{{1}}}|Template:Notice}}
}}|}}
{{safesubst:#if:{{safesubst:#ifeq:Notice|sandbox|1}}{{safesubst:#ifeq:Notice|doc|1}}| |
}} <templatedata> { "params": { "1": { "label": "Contents", "description": "Main content of the notice box", "type": "content", "required": true }, "demospace": {}, "style": {}, "image": {}, "imagealt": {}, "small": {}, "imageright": {}, "shortcut": {}, "shortcut1": {}, "shortcut2": {}, "shortcut3": {}, "shortcut4": {}, "shortcut5": {}, "textstyle": {}, "center": { "label": "Center", "description": "Whether to center the body text", "example": "y", "type": "string", "suggestedvalues": [ "y", "n" ] }, "align": { "type": "string", "suggestedvalues": [ "left", "center", "right" ] }, "header": {}, "heading": { "label": "Heading", "description": "Title of the notice box", "type": "content" }, "title": {}, "headstyle": {}, "text": {}, "content": {}, "reason": {} },
"description": "This is the| {{#if: |[[File:{{{image}}}|40px|Notice|alt=]]}} | {{#if: | ' }}{{{1}}} | {{#if: |{{{imageright}}} |{{#if: |Error: no shortcuts were specified and the |msg= parameter was not set.}} }} |
| {{ safesubst:#titleparts:{{ safesubst:#if:|{{{1}}}|Template:Notice}}|1}}
| {{ safesubst:#if:|{{{1}}}|Template:Notice}}
}}|}} message box. It should be used sparingly and only for 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.", "paramOrder": [ "heading", "1", "center", "align", "demospace", "style", "image", "imagealt", "small", "imageright", "shortcut", "shortcut1", "shortcut2", "shortcut3", "shortcut4", "shortcut5", "textstyle", "header", "title", "headstyle", "text", "content", "reason" ], "format": "inline" } </templatedata>
- Pages with script errors
- Shortcut templates with missing parameters
- Pages with broken file links
- Documentation subpages without corresponding pages
- Wikipedia templates to be automatically substituted
- Wikipedia never-substituted templates
- Wikipedia substituted templates
- Templates with matching hidden id
- Article message templates
- Article message templates with missing parameters
- Pages using small with an empty input parameter
- Talk message boxes
- File message boxes
- Notice and warning templates
- Talk header templates