Template:Ivory messagebox/doc: Difference between revisions
1>WikiSysop m (1 revision imported) |
m (1 revision imported) |
(No difference)
|
Latest revision as of 16:19, 23 April 2021
{{#ifeq:doc |doc
|
{{#ifeq:show |show
| {{#invoke:Message box|mbox}} }}{{#if: | | {{#ifexist:Template:Ivory messagebox | [[Category:{{#switch:Template |Template=Template |Module=Module |User=User |#default=Wikipedia}} documentation pages]] | }} }} | }}
{{#invoke:Message box|ombox}}
The ivory messagebox or Ivmbox is a simplistic, full-width box intended to surround important messages or notices. The ivory background of this template contrasts well to the white background used by most Wikipedia users on most Wikipedia pages (so it is noticeable enough to be used in notices or messages), but the background colour is not as garish as many other message boxes.
The basic use of the template is as follows. If the message you wish to convey using Ivmbox contains complex wiki-code or equals signs, it may be necessary to use |{{#if:1|1=}}Lorem ipsum [etc…]
instead of merely |{{#if:|=}}Lorem ipsum [etc…]
:
{{{{#if: |subst:}}Ivmbox{{#if:Lorem ipsum [etc…] ||Lorem ipsum [etc…]}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||…}}}}
which gives:
The template can display an image to the left of the text content. By default, the image will be 25px in width:
{{{{#if: |subst:}}Ivmbox{{#if:Lorem ipsum [etc…] ||Lorem ipsum [etc…]}}{{#if:Ambox notice.svg ||Ambox notice.svg}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||…}}}}
The image can be made smaller or larger using the |{{#if:imagesize|imagesize=}}
parameter:
{{{{#if: |subst:}}Ivmbox{{#if:Lorem ipsum [etc…] ||Lorem ipsum [etc…]}}{{#if:Ambox notice.svg ||Ambox notice.svg}}{{#if:imagesize=40px ||imagesize=40px}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||…}}}}
Advanced use
By default, if an icon is used with Ivmbox, the icon will not be clickable (in MediaWiki image nomenclature, |{{#if:link|link=}}
will be declared but empty). If you wished, for example, clicking the image to lead to List of Prime Ministers of the United Kingdom, you would include the following parameter:
|{{#if:image link|image link=}}List of Prime Ministers of the United Kingdom
The image, by default, also has no caption; in a similar style, the caption can be declared by including the following parameter:
|{{#if:image caption|image caption=}}Lorem ipsum
The background of an Ivmbox is the off-white X11 colour ivory. If you like the functionality of Ivmbox but require it to display with a background other than the off-white ivory it uses by default, simply include the parameter |{{#if:bg|bg=}}
; for example:
|{{#if:bg|bg=}}salmon
for a salmon message box
|{{#if:bg|bg=}}#90EE90
for a #90EE90 (light green) message box.
See also
There are seven metatemplates in the Module:Message box family:
- {{Ambox}}, for messageboxes on article pages.
- {{Cmbox}}, for messageboxes on category pages.
- {{Imbox}}, for messageboxes on file (image) pages.
- {{Tmbox}}, for messageboxes on talk pages.
- {{Fmbox}}, for header and footer messageboxes.
- {{Ombox}}, for messageboxes on other types of page.
- {{Mbox}}, for messageboxes that are used in different namespaces and change their presentation accordingly.
Closely related metatemplates:
- {{Asbox}}, for messageboxes in article stubs.
- {{Dmbox}}, for messageboxes on disambiguation or set-index pages.
- {{#if: |}}{{#if: |
|{{#if:|
}} }}{{#if: |}}{{#if: |}}{{#if: | |{{}}{{#if: |subst:}}{{#if: |}}{{#if: || {{#if: |{}}[[:{{#ifeq:I|: |Ivory messagebox |{{#switch:
| = Template:{{#if:Ivory messagebox|Ivory messagebox|Ivory messagebox/doc}}
| #default = {{#if:Ivory messagebox|Ivory messagebox|Template:Ivory messagebox/doc}}
}}}}|}}{{#if: |{}}{{#if:Ivory messagebox|Ivory messagebox|{{#ifeq:Template|Template|Ivory messagebox/doc|Template:Ivory messagebox/doc}}}}{{#if: |}}}{{#if: | |]]{{#if: |}}}}}{{#if: |}}{{#if: |}}{{#if: |}}{{#ifeq:¬|¬ | ||{{{2}}}}}{{#ifeq:¬|¬ | ||{{{3}}}}}{{#ifeq:¬|¬ | ||{{{4}}}}}{{#ifeq:¬|¬ | ||{{{5}}}}}{{#ifeq:¬|¬ | ||{{{6}}}}}{{#ifeq:¬|¬ | ||{{{7}}}}}{{#ifeq:¬|¬ | ||{{{8}}}}}{{#ifeq:¬|¬ | ||{{{9}}}}}{{#ifeq:¬|¬ | ||{{{10}}}}}{{#ifeq:¬|¬ | ||{{{11}}}}}{{#if: ||…}}{{#if: |}}{{#if: | |}}}}{{#if: |}}{{#if: |
}}{{#if: |}}, a simple full-width box with default ivory background intended to frame important messages or notices.