Jump to content

Template:Preview warning/doc: Difference between revisions

From Austenasia Wiki
Template:Preview warning>W.andrea
→TemplateData: argument is required (since without it, the template shows an error even outside preview)
 
m 1 revision imported
 
(No difference)

Latest revision as of 16:50, 18 September 2026

__EXPECTED_UNCONNECTED_PAGE__

Template:Preview warning emits a warning in preview. Modules should instead use the module interface _warning() in Module:If preview.

Usage

{{Preview warning|Warning text in preview}}

{{Preview warning|1=Warning text in preview}}

It will be prefaced by "Preview warning:" in bold. The template will emit an always-visible warning if no warning text is supplied.

Parameters

<syntaxhighlight lang="wikitext" inline style="display
none;" />|1=
The warning text you want to provide.

TemplateData

This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:Preview warning in articles based on its TemplateData.

TemplateData for Preview warning

<templatedata> { "params": { "1": { "label": "Warning text", "description": "The warning text you want to provide.", "type": "content", "required": true } }, "description": "Emits a warning in preview.", "format": "inline" } </templatedata>

See also