Predloga:!
| Ta predloga morda nima nobene prevključitve, ker je bila nadomeščena z magično besedo. |
Magična beseda {{!}} se uporablja z namenom izogibanja znaka za pokončnico character "|" v wikibesedilu. Na ta način parser ie interpretira pokončnice kot posebni znak.
Včasih je to bila predloga, toda julija 2014 je MediaWiki parser spremenil to kodo v v direktno interpretacijo {{!}} kot "|" in na ta način se ta predloga ignorira, koda {{!}} pa je postala magična beseda. Še naprej lahko uporabljate kodo na enak način kot prej.
Ne uporabljajte sintakse kot je {{Predloga:!}}, in ne dodajate, na primer {{!|foo}}. V teh primerih, predloga izpiše napakvno sporočilo: 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.
Uporaba
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=
{| class="wikitable"
|+ Caption text
|-
! Header text !! Header text
|-
| Zgled1 || Zgled2
|-
| Zgled3 || Zgled4
|}
}}
yields nonsense:
| “ | + Caption text | ” |
— Zgled1 | ||
However escaping the bars with this magic word and similar templates gives:
{{cquote|text=
{{(!}}class{{=}}"wikitable"
{{!}}+ Caption text
{{!}}-
! Header text !! Header text
{{!}}-
{{!}} Zgled1 {{!!}} Zgled2
{{!}}-
{{!}} Zgled3 {{!!}} Zgled4
{{!)}}
}}
| “ | Sem brez narekovajev vstaviti želeno besedilo. | ” |
For how to include a table in a footnote, do:
Zgled 1{{refn|group=note|This is a note before}}
Zgled 2{{refn|group=note|1=<nowiki></nowiki>{{(!}}class{{=}}"wikitable"
{{!}}+Zgled table with two columns
!A column
!Another column
{{!}}-
{{!}} Some data
{{!}} Some more data
{{!)}}<nowiki></nowiki>}}
Zgled 3{{refn|group=note|This is a note after}}
==Opombe==
{{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.
Zgled 1[note 1]
Zgled 2[note 2]
Zgled 3[note 3]
Opombe
Glej tudi
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
- en:Help:Conditional tables