Template:Notice

From MozillaWiki
Jump to: navigation, search

{{{{#invoke:Namespace detect|main}} | type = | image = | imageright = | class = | style = | textstyle = | text = {{{1}}} | small = | smallimage = | smallimageright = | smalltext = | subst = | date = | name = Notice

}}
Documentation icon Template documentation[view] [edit] [history] [purge]

Usage

This is the {{notice}} message box.

This template should be used sparingly in articles, and should only be used for important comments about the article that cannot be shown using a more specific template. Less important comments should as usual be put as text on the article's talk page instead.

This message box can also be used on other pages, such as on the top of talk or project pages. There it can be used in a more relaxed way.

This box automatically changes style depending on what kind of page it is shown on. That is, it uses the standardised message box styles for the different types of pages.

Articles

This is how this box looks on article (main space) pages. Here is a code example:

{{notice|Include text here.}}

Which renders like this:

{{{{#invoke:Namespace detect|main}} | type = | image = | imageright = | class = | style = | textstyle = | text = Include text here. | small = | smallimage = | smallimageright = | smalltext = | subst = {{subst:substcheck}} | date = | name = Notice }}

The box can be titled with an optional header (heading), like this:

{{notice|header=Header text|Include text here.}}

or

{{notice|heading=Header text|Include text here.}}

Which renders like this:

{{{{#invoke:Namespace detect|main}} | type = | image = | imageright = | class = | style = | textstyle =

| text =
Header text
Include text here.

| small = | smallimage = | smallimageright = | smalltext = | subst = {{subst:substcheck}} | date = | name = Notice }}

The message box can also take an image parameter, but that is discouraged when the box is used in articles. See example further down for how to use that parameter.

Talk pages

This is how this box looks on any talk page. That is, pages that start with "Talk:", "User talk:", "Image talk:" and so on. Here's the basic box again:

{{notice|Include text here.}}

Which renders like this:

{{{{#invoke:Namespace detect|main}} | type = | image = | imageright = | class = | style = | textstyle = | text = Include text here. | small = | smallimage = | smallimageright = | smalltext = | subst = {{subst:substcheck}} | date = | name = Notice }}

The header parameter works on talk pages too. But there is one parameter that only works on talk pages, the small parameter. Like this:

{{notice|small=yes|header=Header text|Include text here.}}

{{{{#invoke:Namespace detect|main}} | type = | image = | imageright = | class = | style = | textstyle =

| text =
Header text
Include text here.

| small = yes | smallimage = | smallimageright = | smalltext = | subst = {{subst:substcheck}} | date = | name = Notice }}

As you can see, "small=yes" causes a smaller right floating box with a smaller image and smaller text size.
Let's try the image parameter too. Like this:

{{notice|small=yes|image=Stop hand nuvola.png
  |header=Header text|Include text here.}}

{{{{#invoke:Namespace detect|main}} | type = | image = Notice | imageright = | class = | style = | textstyle =

| text =
Header text
Include text here.

| small = yes | smallimage = Notice | smallimageright = | smalltext = | subst = {{subst:substcheck}} | date = | name = Notice }}

Image and category pages

This is how this box looks on image pages:

{{{{#invoke:Namespace detect|main}} | type = | image = | imageright = | class = | style = | textstyle = | text = Include text here. | small = | smallimage = | smallimageright = | smalltext = | subst = {{subst:substcheck}} | date = | name = Notice }}

This is how this box looks on category pages:

{{{{#invoke:Namespace detect|main}} | type = | image = | imageright = | class = | style = | textstyle = | text = Include text here. | small = | smallimage = | smallimageright = | smalltext = | subst = {{subst:substcheck}} | date = | name = Notice }}

Other pages

This is how this box looks on most other pages, such as pages that start with "User:", "Wikipedia:", "Help:" and so on.

{{notice|Include text here.}}

Which renders like this:

{{{{#invoke:Namespace detect|main}} | type = | image = | imageright = | class = | style = | textstyle = | text = Include text here. | small = | smallimage = | smallimageright = | smalltext = | subst = {{subst:substcheck}} | date = | name = Notice }}

The box can also take an image parameter. Like this:

{{notice|image=Stop hand nuvola.png|Include text here.}}

Which renders like this:

{{{{#invoke:Namespace detect|main}} | type = | image = Notice | imageright = | class = | style = | textstyle = | text = Include text here. | small = | smallimage = Notice | smallimageright = | smalltext = | subst = {{subst:substcheck}} | date = | name = Notice }}

The header and image parameters can of course be used at the same time.

Using external links

In most cases, external links can be used in the template without any complications. However, links containing an equal sign ( = ) are not read properly, because everything on the left of the equal sign is interpreted as a parameter name. This is the suggested work-around:

{{notice|1=Following this parameter, an equal sign in an external link will be read properly.}}

Adding shortcuts (or images to the right side)

To add shortcuts, images, or other templates to the right side of the image, the following syntax can be used:

{{notice|Include text here.|imageright = IMAGE OR TEMPLATE }}

For example, the following has the File:Wiki letter w.png picture included into it:

{{notice|Include text here.|imageright = [[File:Wiki letter w.png|40px]] }}

Which renders like this:

{{{{#invoke:Namespace detect|main}} | type = | image = | imageright = Wiki letter w.png | class = | style = | textstyle = | text = Include text here. | small = | smallimage = | smallimageright = | smalltext = | subst = {{subst:substcheck}} | date = | name = Notice }}

The following has the {{Shortcut}} template included into it, with a link to You and Me:

{{notice|Include text here.|imageright = {{Shortcut|You|Me}} }}

Which renders like this:

{{{{#invoke:Namespace detect|main}} | type = | image = | imageright = Template:Shortcut | class = | style = | textstyle = | text = Include text here. | small = | smallimage = | smallimageright = | smalltext = | subst = {{subst:substcheck}} | date = | name = Notice }}

Alternate shortcut option

Alternately, instead of using the "imageright" parameter to input shortcuts, the "shortcut" parameter (as well as "shortcut2", "shortcut3", "shortcut4", and "shortcut5") can be used instead of "imageright". The following syntax can be used to add shortcuts:

{{notice|title=Include text here.|shortcut = Me | shortcut2 = You | shortcut3 = Them | shortcut4 = Us | shortcut5 = Everyone}}

Which renders like this:

{{{{#invoke:Namespace detect|main}} | type = | image =

| imageright =
Shortcuts:
Me
You
Them
Us
Everyone

| class = | style = | textstyle = | text = {{{1}}} | small = | smallimage = | smallimageright = | smalltext = | subst = {{subst:substcheck}} | date = | name = Notice }}

Technical note: if both the "imageright" and the "shortcut" parameters are used, only the image/template in the "imageright" template will display. Here is an example of syntax with the "imageright" and "shortcut" parameters:

{{notice|title=Include text here.|imageright = [[File:Wiki letter w.png|40px]] |shortcut = Me | shortcut2 = You | shortcut3 = Them | shortcut4 = Us | shortcut5 = Everyone}}

Which renders like this:

{{{{#invoke:Namespace detect|main}} | type = | image = | imageright = Wiki letter w.png | class = | style = | textstyle = | text = {{{1}}} | small = | smallimage = | smallimageright = | smalltext = | subst = {{subst:substcheck}} | date = | name = Notice }}

See also

  • {{consensus}} – for topics based around reaching consensus
  • {{warning}} – for important warnings
  • {{blackboxwarning}} – for extreme situations
  • {{caution}} – for messages indicating serious problems
  • {{ambox}} – article message boxes of any type; there is comprehensive documentation of its different options
</div>

Navigation menu