The official discord link if you wish to join the discord: https://discord.gg/j5RKwCvAFu

Support the wiki on our official Ko-Fi page or Patreon page!

Template:Notice: Difference between revisions

From The Codex
GiverOfThePeace
GiverOfThePeace (talk | contribs) (Created page with "<includeonly><div class="notice-container {{{noticetype}}}"><div class="notice-title"><span title="{{{subtext|}}}>{{{text}}}</span></div></div></includeonly><noinclude> {{Documentation}} Category:Notice Templates Category:Formatting Templates </noinclude>")
 
Line 1: Line 1:
<includeonly><div class="notice-container {{{noticetype}}}"><div class="notice-title"><span title="{{{subtext|}}}>{{{text}}}</span></div></div></includeonly><noinclude>
<includeonly><div class="notice-container {{{noticetype}}}"><div class="notice-title"><span title="{{{subtext|}}}>{{{text}}}</span></div></div></includeonly><noinclude>
{{Documentation}}
{{DocumentationTabbers}}
[[Category:Notice Templates]]
[[Category:Notice Templates]]
[[Category:Formatting Templates]]
[[Category:Formatting Templates]]
</noinclude>
</noinclude>

Revision as of 14:13, 16 June 2023

Purpose

This template creates a standard notice box, which can be used as totally custom notices or to simplify other notice boxes. By default, this template creates a stand-alone message.

Usage

To use this template, type: {{#vardefine:parameters|{{#vardefine:count16|0}}{{#vardefine:count15|0}}{{#vardefine:count14|0}}{{#vardefine:count13|0}}{{#vardefine:count12|0}}{{#vardefine:count11|0}}{{#vardefine:count10|0}}{{#vardefine:count9|0}}{{#vardefine:count8|0}}{{#vardefine:count7|0}}{{#vardefine:count6|0}}{{#vardefine:count5|0}}{{#vardefine:count4|0}}{{#vardefine:count3|0}}{{#vardefine:count2|1}}{{#vardefine:count1|1}}{{#vardefine:count|Expression error: Unrecognized punctuation character "{".}}{{#var:count}}}}{{#vardefine:content| }}    {{Notice{{#var:content}}}}

  • Text — This is the main, one or two word, message for the notice.
  • Subtext — This is a short text summary of the message. Appears when hovering over the main text.

Use Template:Notice/Start and Template:Notice/End to wrap some content. The notice will have a "hide/show" button to toggle visibility of this content. Template:Notice/Start accepts the parameters as Template:Notice.

Example 1

Code:

{{Notice
|text= Adult Warning!
|subtext= May contain content that is inappropriate for children.
}}

Result:

Adult Warning!

Example 2

Code:

{{Notice/Start
|text= Theory Warning
|subtext= Be advised that the following article or section contains unconfirmed, fan-made theories or speculation.
}}
A theory!
{{Notice/End}}

Result: Template:Notice/Start A theory! Template:Notice/End

The above documentation is transcluded from Template:Notice/Documentation. (edit | history)