Template:!!=

From Zelda Dungeon Wiki
Revision as of 21:10, February 23, 2013 by Locke (talk | contribs) (Created page with "<onlyinclude>{{#if:{{#var:{{{1}}}}}|{{#var:{{{1}}}}}|{{#vardefineecho:{{{1}}}|{{{2}}}}}</onlyinclude> ==Purpose== This template represents an "or-equals" operator (||=). It s...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Want an adless experience? Log in or Create an account.

{{#if:||{{{2}}}

Purpose

This template represents an "or-equals" operator (||=). It sets the given variable to the given value only if the variable doesn't already have a value. It returns the variable's new value, which is the same as its old value if it already had one.

Usage

{{!!=| name | value }}

  • name — The name of the variable (without #var syntax).
  • value — The value to which to initialize the variable if it's empty.