Template:!!

From Gentoo Wiki
Jump to:navigation Jump to:search
[edit

Documentation

Note
This page is a template. It contains some standardized, often used text, which can be transcluded inside other pages. As this template is widely used in our wiki, it may be protected in which case only staff members can change it. Use the discussion page to propose enhancements or fixes, or to voice your opinion.
The information in this article is probably outdated. You can help the Gentoo community by verifying and updating this article.
Important
This template is broken. It gets interpreted as a pipe like the magic word.

This template produces the pipe (or vertical bar) character, |, in such a way that it will never be interpreted as wiki markup (unlike {{!}}, which is interpreted as wiki markup in some contexts — see that template's documentation).

Specifically, its output is | which is the HTML entity for the pipe symbol.

The name of the template was chosen to suggest, "I really want to see a pipe character!" (whereas the name of {{!}} might suggest, "Give me a pipe character that may be used as wiki markup, if necessary").

Note that this template does not work the same way as the Wikipedia template of the same name.

Parameters

None.

Usage

{{!!}}

See the template's testcases:

Correct

Used alone
Wiki code
{{!!}}
Main version
|
Sandbox version
|


↑ The pipe generated by this template call will not be parsed as wiki markup if used in a table or when passed to a template that forms a wikilink. If you want a pipe that may be parsed as table markup or result in a piped link, use {{!}} instead.


Used inside a table cell to display a pipe character
Wiki code
{| class="wikitable"
| this {{!!}} that
|} 
Main version
that
Sandbox version
that


Used in a template parameter to display a pipe character
Wiki code
{{cmd|mount {{!!}} sort}}
Main version
user $mount | sort
Sandbox version
user $mount | sort


↑ Actually, {{!}} could also be used here, but this works fine.


Used in a template parameter to display table wiki markup
Wiki code
{{noop|{{{!!}} class{{=}}"wikitable"<br>
{{!!}} cell contents<br>
{{!!}}}
}}
Main version
{| class="wikitable"

| cell contents
|}

Sandbox version
{| class="wikitable"

| cell contents
|}


↑ This example echoes the one in the documentation of {{!}}, where the output is an actual rendered wikitable (see that documentation for an explanation). This one just shows the code that would have made a table, if fully parsed. Notice that line breaks are "manually" inserted using <br> tags, since single newlines do not become visible line breaks in the output (just as in regular wiki text, where a double-newline [i.e., a "blank line"] is necessary to get a line break). To get this kind of raw-wikicode output, it's probably better to avoid using this template and just wrap normal table wikicode in a <pre> element instead.

Incorrect

Anonymous parameter (no error, but not supported)
Wiki code
{{!!|anything}}
Main version
|
Sandbox version
|


See also

Note
The above documentation is transcluded from Template:!!/doc. (edit | history)
Editors can experiment in this template's sandbox (edit) and testcases (edit) pages.
Please add categories and interwikis to the /doc subpage. (See the subpages of this template.)