= – Template
Jump to navigation
Jump to search
Fred Gandt (talk | contribs) (Good enough for a start.) |
Fred Gandt (talk | contribs) m (Protected "Template:=": High traffic page: Template utility template and as such pivotal ([Edit=Allow only autoconfirmed users] (indefinite) [Move=Allow only autoconfirmed users] (indefinite))) |
(No difference)
|
Revision as of 16:15, 26 May 2014
=
Usage
Use to transclude the equals symbol into template parameters, where the normal use of the symbol would provoke the parsing of the parameter's text, assigning the text to the right of the symbol as the value of a variable named by the text to the left.
i.e. {{Inline code|_foo = true;}}
would result in a transclusion of {{Inline code}} (and/or other similar templates) with the value true;
assigned to a variable called _foo
because of the way MediaWiki parses Template code. So we use {{Inline code|_foo {{=}} true;}}
in order to stop the equals sign being parsed as an assignation. Thus {{Inline code|_foo {{=}} true;}}
results in the desired _foo = true;
.