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

Template:!

  • Template
  • Talk
  • Language
  • Watch
  • View source
Magic word documentation[view] [edit] [history] [purge]
This template should have no transclusions. This is because it was replaced with a magic word.

The magic word {{!}} is used to escape a vertical bar character "|" in 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 {{!}} as "|" and ignore this template, making {{!}} a magic word. You can continue to use the code in exactly the same way as before.

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.


Usage

The code {{!}} is used to 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,

{{cquote|text=
This is text before
{| class="wikitable"
|+ Caption text
|-
! Header text !! Header text
|-
| Example 1 || Example 2
|-
| Example 3 || Example 4
|}
This is text after
}}

yields nonsense:

“

This is text before {

”
— Example 1

However escaping the bars with this magic word and similar templates gives:

{{cquote|text=
This is text before
{{(!}} class{{=}}"wikitable"
{{!+}} Caption text
{{!-}}
! Header text !! Header text
{{!-}}
{{!}} Example 1 {{!!}} Example 2
{{!-}}
{{!}} Example 3 {{!!}} Example 4
{{!)}}
This is text after
}}


“

This is text before

Caption text
Header text Header text
Example 1 Example 2
Example 3 Example 4

This is text after

”

For how to include a table in a footnote, do:

Example 1{{refn|group=note|This is a note before}}

Example 2{{refn|group=note|1=<nowiki />This is text before
{{(!}} class{{=}}"wikitable"
{{!+}} Caption text
{{!-}}
! Header text !! Header text
{{!-}}
{{!}} Example 1 {{!!}} Example 2
{{!-}}
{{!}} Example 3 {{!!}} Example 4
{{!)}}
This is text after
<nowiki />}}

Example 3{{refn|group=note|This is a note after}}

==Notes==
{{Reflist|group=note}}

Be careful to follow this formatting, 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[note 1]

Example 2[note 2]

Example 3[note 3]

Notes

  1. ^ This is a note before
  2. ^ This is text before
    Caption text
    Header text Header text
    Example 1 Example 2
    Example 3 Example 4

    This is text after

  3. ^ This is a note after

See also

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;

Documentation for the magic word may be found in the MediaWiki documentation at mw:Help:Magic words#Other.

  • {{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
The above documentation is transcluded from Template:!/doc. (edit | history)
Editors can experiment in this template's sandbox (create | mirror) 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:!&oldid=1277088666"
Last edited on 22 February 2025, at 16:04

Languages

    • Acèh
    • Адыгэбзэ
    • Afrikaans
    • Alemannisch
    • አማርኛ
    • Ænglisc
    • Аԥсшәа
    • العربية
    • Aragonés
    • ܐܪܡܝܐ
    • Armãneashti
    • Arpetan
    • অসমীয়া
    • Asturianu
    • अवधी
    • Avañe'ẽ
    • Авар
    • Aymar aru
    • Azərbaycanca
    • تۆرکجه
    • Basa Bali
    • Bamanankan
    • বাংলা
    • Banjar
    • 閩南語 / Bân-lâm-gí
    • Basa Banyumasan
    • Башҡортса
    • Беларуская
    • भोजपुरी
    • Bislama
    • Български
    • Boarisch
    • བོད་ཡིག
    • Bosanski
    • Brezhoneg
    • Буряад
    • Чӑвашла
    • Cebuano
    • Čeština
    • Chamoru
    • Chavacano de Zamboanga
    • ChiShona
    • ChiTumbuka
    • Corsu
    • Cymraeg
    • Dansk
    • الدارجة
    • Davvisámegiella
    • ދިވެހިބަސް
    • Diné bizaad
    • Dolnoserbski
    • ཇོང་ཁ
    • Emiliàn e rumagnòl
    • Эрзянь
    • Español
    • Estremeñu
    • Euskara
    • فارسی
    • Fiji Hindi
    • Føroyskt
    • Français
    • Frysk
    • Fulfulde
    • Furlan
    • Gaeilge
    • Gaelg
    • Gagauz
    • Gàidhlig
    • Galego
    • ГӀалгӀай
    • 贛語
    • Gĩkũyũ
    • گیلکی
    • ગુજરાતી
    • 𐌲𐌿𐍄𐌹𐍃𐌺
    • गोंयची कोंकणी / Gõychi Konknni
    • 客家語 / Hak-kâ-ngî
    • Хальмг
    • 한국어
    • Hausa
    • Hawaiʻi
    • Հայերեն
    • हिन्दी
    • Hornjoserbsce
    • Ido
    • Igbo
    • বিষ্ণুপ্রিয়া মণিপুরী
    • Interlingue
    • ᐃᓄᒃᑎᑐᑦ / inuktitut
    • Ирон
    • IsiXhosa
    • IsiZulu
    • Jawa
    • ಕನ್ನಡ
    • Kapampangan
    • Къарачай-малкъар
    • ქართული
    • کٲشُر
    • Kaszëbsczi
    • Қазақша
    • Kernowek
    • Ikinyarwanda
    • Коми
    • Kongo
    • Кыргызча
    • Кырык мары
    • Ladin
    • Ladino
    • Лакку
    • ລາວ
    • Latgaļu
    • Лезги
    • Lietuvių
    • Limburgs
    • Livvinkarjala
    • La .lojban.
    • Lombard
    • Македонски
    • Malagasy
    • മലയാളം
    • Malti
    • Māori
    • मराठी
    • მარგალური
    • مصرى
    • ဘာသာမန်
    • مازِرونی
    • Bahasa Melayu
    • Minangkabau
    • 閩東語 / Mìng-dĕ̤ng-ngṳ̄
    • Mirandés
    • Мокшень
    • Монгол
    • မြန်မာဘာသာ
    • Nāhuatl
    • Na Vosa Vakaviti
    • Nedersaksies
    • नेपाली
    • नेपाल भाषा
    • 日本語
    • Napulitano
    • Нохчийн
    • Nordfriisk
    • Norsk nynorsk
    • Nouormand
    • Novial
    • Occitan
    • Олык марий
    • ଓଡ଼ିଆ
    • Oshiwambo
    • Oʻzbekcha / ўзбекча
    • ਪੰਜਾਬੀ
    • पालि
    • Pälzisch
    • پنجابی
    • ပအိုဝ်ႏဘာႏသာႏ
    • پښتو
    • Перем коми
    • ភាសាខ្មែរ
    • Picard
    • Piemontèis
    • Tok Pisin
    • Ποντιακά
    • Qaraqalpaqsha
    • Qırımtatarca
    • Reo tahiti
    • Ripoarisch
    • Română
    • Romani čhib
    • Rumantsch
    • Runa Simi
    • Русиньскый
    • Русский
    • Саха тыла
    • संस्कृतम्
    • Sängö
    • ᱥᱟᱱᱛᱟᱲᱤ
    • Sardu
    • Scots
    • Seeltersk
    • Sesotho
    • Sesotho sa Leboa
    • Setswana
    • Shqip
    • සිංහල
    • Simple English
    • سنڌي
    • SiSwati
    • Slovenčina
    • Slovenščina
    • Словѣньскъ / ⰔⰎⰑⰂⰡⰐⰠⰔⰍⰟ
    • Ślůnski
    • Soomaaliga
    • کوردی
    • Sranantongo
    • Српски / srpski
    • Srpskohrvatski / српскохрватски
    • Sunda
    • Svenska
    • Tagalog
    • தமிழ்
    • Taqbaylit
    • Tarandíne
    • Татарча / tatarça
    • တႆး
    • తెలుగు
    • Tetun
    • ไทย
    • Тоҷикӣ
    • Lea faka-Tonga
    • ᏣᎳᎩ
    • Tsetsêhestâhese
    • Tshivenda
    • ತುಳು
    • Türkçe
    • Türkmençe
    • Twi
    • Тыва дыл
    • Удмурт
    • Basa Ugi
    • Українська
    • اردو
    • ئۇيغۇرچە / Uyghurche
    • Vahcuengh
    • Vèneto
    • Vepsän kel’
    • Tiếng Việt
    • Volapük
    • Võro
    • Walon
    • West-Vlams
    • Winaray
    • Wolof
    • Xitsonga
    • ייִדיש
    • Yorùbá
    • 粵語
    • Zazaki
    • Zeêuws
    • Žemaitėška
    • 中文
    • Kumoring
    • ရခိုင်
    • ትግሬ
    Wikipedia
    • Wikimedia Foundation
    • Powered by MediaWiki
    • This page was last edited on 22 February 2025, at 16:04 (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