Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Help:Table
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Rendering the pipe === {{anchor|Rendering_pipe_itself}} When cell ''content'' that contains a [[vertical bar|pipe]] character does not render correctly, simply add an empty format for that cell. The second pipe character in a line of <code>|''cell code''</code> will not display; it is reserved for adding a format. Wikicode between the first and second pipe is a format, but since emptiness or an error there is ignored, it just disappears. When this happens, add a dummy format. {{Crossref|selfref=no|(For a real format, see {{section link||HTML attributes}}.)}} Use a third pipe character to render your first pipe character. <div class="box"> Rendering the first pipe when it is the third pipe in the cell code. '''Wikitext''' <syntaxhighlight lang=wikitext> {| class=wikitable |- | ''formatting'' |P|i|p|e| |C|e|l|l|2| |- | ''formatting'' |P|i|p|e|| ''formatting'' |C|e|l|l|2| |- ||P|i|p|e|s|| C|e|l|l|2| |} </syntaxhighlight></div> <div class="box"> '''Produces''' {| class=wikitable |- | ''formatting'' |P|i|p|e| |C|e|l|l|2| |- | ''formatting'' |P|i|p|e|| ''formatting'' |C|e|l|l|2| |- ||P|i|p|e|s|| C|e|l|l|2| |} </div> The third and later pipe characters will render, but to display two ''adjacent'' pipe characters in a cell, (instead of having them act as the first pipe at the start of a new cell), other pipe-rendering options are needed. Instead of using a dummy format to render a pipe, you can render it directly by 1) {{tag|nowiki|content={{!}}}} (preferred) or 2) [[html#Character and entity references| html]]: <code>&#124;</code> or <code>&#x7C;</code>. Each line of cell code in the following table has one wikicode pipe. <div class="box"> Displaying adjacent pipes '''Wikitext''' <syntaxhighlight lang=wikitext> {| class=wikitable |- |<nowiki>|</nowiki> Pipes34:<nowiki>||</nowiki> |- || Pipes34:|| |} </syntaxhighlight></div> <div class="box"> '''Produces''' {| class=wikitable |- |<nowiki>|</nowiki> Pipes34:<nowiki>||</nowiki> |- || Pipes34:|| |} </div> Template {{tl2|!}}, because of the order in which things are parsed, is equivalent to typing in a single | pipe character. The single <code>[[help:nowiki|<nowiki />]]|</code> parser-tag does not apply here. See how they do not [[escape character|escape]] the second pipe, as &#124 and {{tag|nowiki|content={{!}}}} did above: <div class="box"> Common mechanisms that do not work in tables. '''Wikitext''' <syntaxhighlight lang=wikitext> {| class=wikitable |- |<nowiki />| Pipe3:| |- |Pipe2:{{!}} Pipe3:{{!}} |} </syntaxhighlight></div> <div class="box"> '''Produces''' {| class=wikitable |- |<nowiki />| Pipe3:| |- |Pipe2:{{!}} Pipe3:{{!}} |} </div>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)