• Home
  • Random
  • Nearby
  • Log in
  • Settings
Donate Now If Wikipedia is useful to you, please give today.
  • About Wikipedia
  • Disclaimers
Wikipedia

Template:=/sandbox

  • Template
  • Talk
  • Language
  • Watch
  • Edit
< Template:=
This is the template sandbox page for Template:= (diff).
Magic word documentation[view] [edit] [history] [purge]
This template should have no transclusions. This is because it was replaced with a magic word.

This magic word allows "=" to be used in unnamed template parameters, rather than being interpreted as the separator between the parameter name and value. It evaluates to the equals sign, =. Alternatively, the HTML entity "&#61;" can be used if there is no need for it to be interpreted as wikimarkup, such as when the literal equals-sign is to be displayed to the user. Until June 2022, there was a template at this ___location with the same function, but it was replaced with a magic word for performance reasons in Phab:T91154.

Do not use syntax like {{Template:=}}, and do not supply a parameter, for example {{=|foo}}. In those cases, the template transcludes as an error message: Error: The retired template {{=}} has been transcluded; see mw:Help:Magic words#Other for details. To fix this, use only the code {{=}} to generate the = character.

Do not use this magic word in URLs. Instead, use percent-encoding or no encoding:

  • Wrong: https://example.com/?arg{{=}}789
  • Sometimes correct: https://example.com/?arg%3D789 ("=" is a reserved character with special meaning it may break the URL when encoded at certain locations)
  • Correct: https://example.com/?arg=789

Usage

edit
  • {{Font color|black|yellow|2 + 2 {{=}} 4}} produces: 2 + 2 = 4

You can also use named parameters to bypass the restriction:

  • {{Font color|black|yellow|3= 2 + 2 = 4}} produces: 2 + 2 = 4

Unlike &#61;, the magic word only delays the interpretation of the symbol as code:

{{concat|<div style{{=}}"font-style:italic">This should be italicised.</div>}}
{{concat|<div style&#61;"font-style:italic">This will not be italicised.</div>}}

produces:

This should be italicised.
This will not be italicised.

TemplateData

edit
This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:= in articles based on its TemplateData.

TemplateData for =

A magic word to allow = to be used in template parameters

Template parameters[Edit template data]

This template has custom formatting.

ParameterDescriptionTypeStatus
No parameters specified

See also

edit
This table:
  • view
  • talk
  • edit
Template call
(m for magic word)
Output (delayed interpretation as wikimarkup) HTML alternative (never interpreted as wikimarkup)
{{!}} (m) | &#124; or {{pipe}}
{{=}} (m) = &#61;
{{!!}} || &#124;&#124;
{{!(}} [ &#91;
{{)!}} ] &#93;
{{!((}} [[ &#91;&#91;
{{))!}} ]] &#93;&#93;
{{(}} { &#123;
{{)}} } &#125;
{{((}} {{ &#123;&#123;
{{))}} }} &#125;&#125;
{{(((}} {{{ &#123;&#123;&#123;
{{)))}} }}} &#125;&#125;&#125;
{{(!}} {| &#123;&#124;
{{!+}} |+ &#124;&#43;
{{!-}} |- &#124;&#45;
{{!)}} |} &#124;&#125;
  • Template:Spaces
  • mw:Help:Magic words
The above documentation is transcluded from Template:=/doc. (edit | history)
Editors can experiment in this template's sandbox (edit | diff) and testcases (create) pages.
Add categories to the /doc subpage. Subpages of this template.
Retrieved from "https://en.wikipedia.org/w/index.php?title=Template:%3D/sandbox&oldid=1090697914"
Last edited on 30 May 2022, at 21:51

Languages

      This page is not available in other languages.

      Wikipedia
      • Wikimedia Foundation
      • Powered by MediaWiki
      • This page was last edited on 30 May 2022, at 21:51 (UTC).
      • Content is available under CC BY-SA 4.0 unless otherwise noted.
      • Privacy policy
      • About Wikipedia
      • Disclaimers
      • Contact Wikipedia
      • Code of Conduct
      • Developers
      • Statistics
      • Cookie statement
      • Terms of Use
      • Desktop