Template:!/doc
Appearance
![]() |
This is a metatemplate; that is, a template that will rarely be used directly in articles, but rather used in other templates which will be used directly. |
{{!}}
This template is used inside conditionals or parameter strings to generate a vertical bar (|
), since using the vertical bar itself would confuse the template syntax parser. You would primarily use this if your template generated a table, but needed to put some of the table in a conditional like {{#if: ...}}
{|class="wikitable" |- !Header 1 !Header 2 {{#if: {{{showcontent|}}}| {{!}}- {{!}}Cell 1 {{!}}Cell 2 }} |}
Since the first vertical bar inside the #if:
block introduces the content to use if the condition is met, and a second one would introduce the content to use if the condition is not met, we cannot use the vertical bar to begin the new row of the table, nor the cells within it, as we normally would in wiki table syntax. So instead, we wrap the whole row in the #if:
block and replace its vertical bars with the
{{!}}
template.