Vorlage:!/doc: Unterschied zwischen den Versionen

Aus OBS Wiki
Zur Navigation springen Zur Suche springen
(Die Seite wurde neu angelegt: „Got nothing to say about me really.<br>Feels good to be a member of bergau.de.<br>I just wish I am useful in some way .<br><br>My blog ... [http://www.lagosmee…“)
 
(ce)
Zeile 1: Zeile 1:
Got nothing to say about me really.<br>Feels good to be a member of bergau.de.<br>I just wish I am useful in some way .<br><br>My blog ... [http://www.lagosmeet.com/forum/posts/id_26179/ root explorer apk license keyroot explorer 4.7 apk]
{{Documentation subpage}}
{{transclusionless|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 "&#124;" 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 "&#124;" 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: {{!xt|Error: The retired template <nowiki>{{!}}</nowiki> has been transcluded; see mw:Help:Magic words#Other for details. To fix this, use only the code <nowiki>{{!}}</nowiki> to generate the &#124; character.}}
 
== Usage ==
The code <code><nowiki>{{!}}</nowiki></code> is used to [[Escape_character|escape]] the vertical bar character, &#124;, 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>
{{rquote|none|text=
{| class="wikitable"
|+ Caption text
|-
! Header text !! Header text
|-
| Example || Example
|-
| Example || Example
|}
}}
</pre>
 
yields nonsense:
 
{{rquote|none|text=
{| class="wikitable"
|+ Caption text
|-
! Header text !! Header text
|-
| Example || Example
|-
| Example || Example
|}
}}
 
However escaping the bars with this magic word and similar templates gives:
 
<pre>
{{rquote|none|<nowiki&gt;
</nowiki>{{(!}} class{{=}}"wikitable"
{{!}}+ Caption text
{{!}}-
! Header text !! Header text
{{!}}-
{{!}} Example {{!!}} Example
{{!}}-
{{!}} Example {{!!}} Example
{{!}}}
}}
</pre>
 
{{rquote|none|<nowiki>
</nowiki>{{(!}} class{{=}}"wikitable"
{{!}}+ Caption text
{{!}}-
! Header text !! Header text
{{!}}-
{{!}} Example {{!!}} Example
{{!}}-
{{!}} Example {{!!}} Example
{{!)}}
}}
 
==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>

Version vom 23. Februar 2022, 15:07 Uhr

Skriptfehler: Ein solches Modul „Message box“ ist nicht vorhanden. Vorlage:Transclusionless

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,

{{rquote|none|text=
{| class="wikitable"
|+ Caption text
|-
! Header text !! Header text
|-
| Example || Example
|-
| Example || Example
|}
}}

yields nonsense:

Vorlage:Rquote

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

{{rquote|none|<nowiki>
</nowiki>{{(!}} class{{=}}"wikitable"
{{!}}+ Caption text
{{!}}-
! Header text !! Header text
{{!}}-
{{!}} Example {{!!}} Example
{{!}}-
{{!}} Example {{!!}} Example
{{!}}}
}}

Vorlage:Rquote

See also

Skriptfehler: Ein solches Modul „Navbar“ ist nicht vorhanden.
  1. Redirect Template:Nowrap

Vorlage:Rcat shell
Vorlage:Normal

  1. Redirect Template:Nowrap

Vorlage:Rcat shell Vorlage:Normal

  1. Redirect Template:Nowrap

Vorlage:Rcat shell Vorlage:Normal

Vorlage:Tlx (m) | &#124; or
  1. REDIRECT Template:Template link

Vorlage:Redirect category shell

Vorlage:Tlx = &#61;
Vorlage:Tlx || &#124;&#124;
Vorlage:Tlx [ &#91;
Vorlage:Tlx ] &#93;
Vorlage:Tlx [[ &#91;&#91;
Vorlage:Tlx ]] &#93;&#93;
Vorlage:Tlx { &#123;
Vorlage:Tlx } &#125;
Vorlage:Tlx {{ &#123;&#123;
Vorlage:Tlx }} &#125;&#125;
Vorlage:Tlx {{{ &#123;&#123;&#123;
Vorlage:Tlx }}} &#125;&#125;&#125;
Vorlage:Tlx {| &#123;&#124;
Vorlage:Tlx |- &#124;&#45;
Vorlage:Tlx |} &#124;&#125;

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

  1. REDIRECT Template:Template link

Vorlage:Redirect category shell, a template that uses the numeric character reference for the vertical bar character