Template:Internal/Warning

From Halopedia, the Halo wiki

vde
Template Documentation

Warning templates

General template warnings

Parameter warnings

IMPORTANT: If you intend to create a new warning template, please make sure to also create its respective category page and make that category a subcategory of Category:Pages containing template warnings. This makes it easier to find and fixing template warnings on pages!

Usage

This template is used to signal issues or potential issues with template usage to the user. Templates should use this or another warning template in cases where a template is being used improperly (or in a deprecated manner), but is defaulting to some sensible functionality or was able to infer the correct intended usage. Warnings will not display on the rendered page for readers, but will be add a message to the page preview header and add the page to a relevant category.

Under normal circumstances, templates should use one of the other, more specific warning templates, so that the warning message, type and category is more specific.

IMPORTANT: Warnings should only be used in cases where the issue is recoverable, and the template is still displaying in a sensible manner on the page! If the issue cannot be recovered from, please use Template:Internal/Error instead, to give the editor a more severe warning!

Simplified Version Full Version
{{Internal/Warning
|
}}
{{Internal/Warning
|Name=
|Category=
|Template=
|
}}

Parameters

Field Name Field Aliases Optional or Required? Description Example
1 (Unnamed field) Message Required The message to present to the user. Unrecognised acronym: "banana"!
Type - Optional The type of warning. Invalid parameter
Catgory - Optional The category to insert pages into if they contain an warning of this type. Pages containing invalid template parameter warnings
Template - Recommended The name of the template in which the error has occurred. Acronym

Error states

This template is guaranteed never to throw an error, but will always throw a warning - that is its purpose.

Examples

Here are some examples of how to use this template:

Wiki Markup Resulting Warning
{{Internal/Warning}}
TEMPLATE WARNING: This template issued a warning. Are the parameters all correct?
{{Internal/Warning|Unrecognised acronym: "banana"!|Type=Invalid parameter|Category=Pages containing invalid template parameter errors}}
INVALID PARAMETER WARNING: Unrecognised acronym: "banana"!