Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.
Revision as of 04:03, 17 February 2026 by imported>Keplare (include closing </p> as this breaks the mobile css)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Template documentation (for the above template, sometimes hidden or invisible) [view] [edit] [history] [refresh]
Template loop detected: Template:DW/Sitenotice/doc
The above text is transcluded from Template:DW/Sitenotice/doc; you can change it or view its history.
If you're done making changes, please refresh the text.
Please add categories and interwikis to Template:DW/Sitenotice/doc. (View all subpages of this page.)

This template is used on MediaWiki:Sitenotice

Usage

{{Sitenotice
|image      = Displays an image before the text (should be set to x40px if it's too big).
|image bg   = Colour of the div where the image is displayed (Hex, Name, or Class).
|text       = Text to be displayed 
|text bg    = Colour of the div where the text is displayed (Hex, Name, or Class).
|text color = If, for some reason, you need the text to be a different colour (Hex, Name, or Class).
|mobile     = Can be set to 'yes' to enable displaying the sitenotice on the mobile skin.
}}
  • The sitenotice is defaulted to not be shown on the mobile skin. Per meta:Forum:Mobile sitenotice, this behaviour can be switched off by setting the |mobile parameter to 'yes' in cases of scheduled website outages and others.
  • The |type parameter may be omitted. All site notices of a given type are dismissed together regardless of the site notice id number.
  • The |image parameter may be omitted, leaving the text full width. |image bg will be automatically omitted with it.
  • Existing colour classes may be used on |text bg and |image bg instead, listed below. These will automatically switch between dark and light modes.
Backgrounds Text
table-bg-red text-red
table-bg-orange text-orange
table-bg-yellow text-yellow
table-bg-green text-green
table-bg-blue text-blue
table-bg-purple text-purple
table-bg-pink text-pink
table-bg-grey text-grey

Note that %CLOSE% is replaced by the close X, positioned absolutely in the top right of the parent (or left for ltr), however any padding/margins etc to ensure that the X does not overlap the contents must be added manually (done within this template).

Examples

Code Result
{{Sitenotice
|image      = [[File:Red Topaz.png|x40px]]
|image bg   = #801c13
|text       = This is where you will write your text. You can use <code><choose></code> and such. This '''must''' used for site-wide bugs and issues noted by RSDW administrators.
|text bg    = #9f261e
|text color = white
}}
Template:Sitenotice
{{Sitenotice
|text       = This is a text only sitenotice where the image was omitted, with changing background and text colors. This '''must''' be used for starting events, whether this is in conjunction with the Dragonwilds Discord, or similar.
|text bg    = table-bg-green
|text color = text-green
}}
Template:Sitenotice
{{Sitenotice
|type       = warn
|image      = [[File:Artisan.png|40px]]
|image bg   = palegoldenrod
|text       = This is a sitenotice with a type, such as for cautionary and warning notices.
|text color = #fff
|text bg = #DAA520
}}
Template:Sitenotice