Template:Error: Difference between revisions

From Rhythm Heaven Wiki
Jump to navigation Jump to search
m ('s' forgotten in category name 😰)
mNo edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
<{{{tag|strong}}} class="error">{{{1}}}</{{{tag|strong}}}><noinclude>
<includeonly>{{#invoke:Error|main}}</includeonly><noinclude>
{{doc|content=
{{doc|content=
This template returns a state of error (recognized as such by a [[mw:Help:Extension:ParserFunctions|wiki parser function]]), and optionally an error-message text in red (visible for the user). It is used by other templates to signal an error, for example invalid input, which can then either be displayed to the editor or caught and handled by other templates.
This template returns a state of error (recognized as such by a [[mw:Help:Extension:ParserFunctions|wiki parser function]]), and optionally an error-message text in red (visible for the user). It is used by other templates to signal an error, for example invalid input, which can then either be displayed to the editor or caught and handled by other templates.


Parameters:
Parameters:
* {{param|1}}: The error message. e.g. {{tl|Error|An error message}} yields {{Error|An error message}}.
* {{param|1}}: The error message. e.g. {{tl|Error|An error message|code=1}} yields {{Error|An error message}}.
* {{param|tag}}: Name of the HTML tag that wraps your error message. <code>strong</code> is used by default.
* {{param|tag}}: ''Case-insensitive'' name of the HTML tag that wraps your error message. <code>strong</code>, <code>span</code>, <code>p</code> and <code>div</code> are accepted. If this argument is not given or doesn't match any of these four, <code>strong</code> is used.


This template is inspired by [[mw:Template:Error|the eponymous template]] on mediawiki.org. Go there and you can learn more.
This template is inspired by [[mw:Template:Error|the eponymous template]] on mediawiki.org. Go there and you can learn more.
}}
}}
[[Category:Formatting templates]]</noinclude>
[[Category:Formatting templates]]</noinclude>

Latest revision as of 10:30, 3 August 2025

Template-info.svg Template Documentation

This template returns a state of error (recognized as such by a wiki parser function), and optionally an error-message text in red (visible for the user). It is used by other templates to signal an error, for example invalid input, which can then either be displayed to the editor or caught and handled by other templates.

Parameters:

  • {{{1}}}: The error message. e.g. {{Error|An error message}} yields An error message.
  • {{{tag}}}: Case-insensitive name of the HTML tag that wraps your error message. strong, span, p and div are accepted. If this argument is not given or doesn't match any of these four, strong is used.

This template is inspired by the eponymous template on mediawiki.org. Go there and you can learn more.