Jump to content

Template:Preview warning/doc

From Austenasia Wiki
Revision as of 18:01, 21 June 2026 by Template:Preview warning>W.andrea (→TemplateData: argument is required (since without it, the template shows an error even outside preview))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

__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