Permanently protected template

Template:Var

From Yugipedia
Jump to: navigation, search
Template documentation[view] [edit] [history] [purge]

{{Var}} is a technical template allowing a default value to be specified if a given parameter is empty. This is useful because when a template uses something like {{{param|default}}}, and it is called with |param= (with no value given for param), the default value default will not be displayed.

Usage

{{Var|{{{param}}}|default}}

Technical notes

This template is exactly equal to {{ #if: {{{param|}}} | {{{param}}} | default }} and should be avoided in favor of the raw code in cases where there is little overhead or in widely used templates.

See also