Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Template:!/doc
Template
Discussion
English
Read
Edit source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit source
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Documentation subpage}} {{transclusionless|should=yes|reason=it was replaced with a [[Help:Magic words|magic word]]}} The magic word <code><nowiki>{{!}}</nowiki></code> is used to escape a [[vertical bar]] character "|" in [[wp:wikitext|wikitext]] markup, causing the parser to temporarily not interpret it as a special character. This used to be a template, but for speed reasons, the [[MediaWiki]] parser was changed in July 2014 to instantly interpret <code><nowiki>{{!}}</nowiki></code> as "|" and ignore this template, making <code><nowiki>{{!}}</nowiki></code> a [[mw:Help:Magic words|magic word]]. You can continue to use the code in exactly the same way as before. Do not use syntax like <code><nowiki>{{Template:!}}</nowiki></code>, and do not supply a parameter, for example <code><nowiki>{{!|foo}}</nowiki></code>. In those cases, the template transcludes as an error message: {{error|Error: The retired template {{tn|!}} has been transcluded; see [[mw:Help:Magic words#Other]] for details. To fix this, use only the code {{Magic word|!}} to generate the | character.}} == Usage == The code <code><nowiki>{{!}}</nowiki></code> is used to [[Escape_character|escape]] the vertical bar character, |, so that it is interpreted later than it would be otherwise. This is mostly useful when trying to include a table in a template. For example, <pre> {{cquote|text= {| class="wikitable" |+ Caption text |- ! Header text !! Header text |- | Example1 || Example2 |- | Example3 || Example4 |} }} </pre> yields nonsense: {{cquote|text=<nowiki/> {| class="wikitable" |+ Caption text |- ! Header text !! Header text |- | Example1 || Example2 |- | Example3 || Example4 |} }} However escaping the bars with this magic word and similar templates gives: <pre> {{cquote|text= {{(!}} class{{=}}"wikitable" {{!}}+ Caption text {{!}}- ! Header text !! Header text {{!}}- {{!}} Example1 {{!!}} Example2 {{!}}- {{!}} Example3 {{!!}} Example4 {{!)}} }} </pre> {{cquote|text=<nowiki/> {{(!}} class{{=}}"wikitable" {{!}}+ Caption text {{!}}- ! Header text !! Header text {{!}}- {{!}} Example1 {{!!}} Example2 {{!}}- {{!}} Example3 {{!!}} Example4 {{!)}} }} For how to include a table in a footnote, do: <pre> Example 1{{refn|group=note|This is a note before}} Example 2{{refn|group=note|1=<nowiki></nowiki>{{(!}}class{{=}}"wikitable" {{!}}+ Example table with two columns ! A column ! Another column {{!}}- {{!}} Some data {{!}} Some more data {{!)}}<nowiki></nowiki>}} Example 3{{refn|group=note|This is a note after}} ==Notes== {{Reflist|group=note}} </pre> Be careful to follow this formatting, [[Special:Diff/1078738513|otherwise the table may gobble up the subsequent footnote]]. This can be unnoticeable if there is only one footnote, only causing an issue if a second footnote is added. Example 1{{refn|group=note|This is a note before}} Example 2{{refn|group=note|1=<nowiki></nowiki> {{(!}} class{{=}}"wikitable" {{!}}+ Example table with two columns ! A column ! Another column {{!}}- {{!}} Some data {{!}} Some more data {{!)}}<nowiki></nowiki>}} Example 3{{refn|group=note|This is a note after}} ==Notes== {{Reflist|group=note}} ==See also== {{Escape template list}} Documentation for the magic word may be found in the MediaWiki documentation at [[mw:Help:Magic words#Other]]. * {{tl|pipe}}, a template that uses the [[numeric character reference]] for the vertical bar character * [[m:Help:Template#A parameter value containing a pipe character]] *[[Help:Conditional tables]] <includeonly>{{sandbox other|| <!-- Categories below this line; interwikis at Wikidata --> [[Category:Character-substitution templates]] }}</includeonly>
Summary:
Please note that all contributions to Red Letter Media Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
RLMWiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Template:!/doc
Add topic