Template:!
| 呢個模唔應有任何嵌入頁面,因為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.
用法
[編輯]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:
版Template:Rquote/styles.css無内容。
| “ | { | ” | ||
| — - | Header text | Header text
, - | ||
|---|---|---|---|---|
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
{{!}}}
}}
版Template:Rquote/styles.css無内容。
| “ |
|
” | ||||||
睇埋
[編輯]Template:Escape template list 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
| 上面嘅解係穿透包含咗自Template:!/doc。 (改 | 史) 編者可以響呢個模嘅沙盤 (開 | 鏡)同埋試例 (開)版度試驗佢。 請加個類到個/doc嘅細版度。 呢個模嘅細版。 |