Template:!!=: Difference between revisions
Jump to navigation
Jump to search
Want an adless experience? Log in or Create an account.
(Created page with "<onlyinclude>{{#if:{{#var:{{{1}}}}}|{{#var:{{{1}}}}}|{{#vardefineecho:{{{1}}}|{{{2}}}}}</onlyinclude> ==Purpose== This template represents an "or-equals" operator (||=). It s...") |
mNo edit summary |
||
Line 1: | Line 1: | ||
<onlyinclude>{{#if:{{#var:{{{1}}}}}|{{#var:{{{1}}}}}|{{#vardefineecho:{{{1}}}|{{{2}}}}}</onlyinclude> | <onlyinclude>{{#if:{{#var:{{{1}}}}}|{{#var:{{{1}}}}}|{{#vardefineecho:{{{1}}}|{{{2}}}}}}}</onlyinclude> | ||
==Purpose== | ==Purpose== |
Latest revision as of 21:11, February 23, 2013
{{{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.