Template:!
|
Documentation
This template provides a "pipe" character (|) for use in contexts where it would otherwise be interpreted as part of wiki markup syntax (e.g., in wikilinks, tables, and templates).
Any input to the template is ignored.
The template is actually not called if {{!}} is used, because that exact string is handled "natively" by MediaWiki. (This is why there are so few pages that show up as using this template, even though {{!}} is being used on hundreds of pages.)
The examples below show a couple of ways of forcing a call to the template.
Note: If you need two "pipes" in a row (||), it's more efficient (in terms of typing) to use {{!!}} rather than {{!}}{{!}}.
Usage
{{!}}
Examples
{{!}}⇒ |{{!|}}⇒ |{{Template:!}}⇒ |
The first example uses the built-in feature; the second and third actually call this template. (In the second example, empty input is being passed to the template in the first unnamed/positional parameter). All three examples are totally equivalent in terms of their effects, except the first is a bit more efficient than the other two.
Here's a more useful example:
{{tc|foo{{!}}}}⇒{{foo|}}
This shows the markup that would call a template with an empty first positional parameter (which is how the second example above was actually accomplished). The {{!}} is necessary here because the following doesn't do the right thing:
{{tc|foo|}}⇒{{foo}}
There are other ways of accomplishing the same thing, like:
{{tc|foo|{{noop}}}}⇒{{foo|}}{{tc|foo|<nowiki />}}⇒{{foo|}}
(See {{noop}}.)