| advertise add site services publishers database health videos | ![]() | about toolbar stats live show health store more stuff JOIN/LOGIN |
Learn Sun Salutations 10 tips and tricks to help from Mark Giubarelli yogacards.com | Diet tips and tricks helps in curbing every-day diet problems diethealthclub.com | Lead pipe or drain pipe chronic colitis appearance thehutchinsonclinic.co.uk | Bag Pipe Bag Pipe spabodyworkmarket.com |
The pipe trick uses the pipe character ("|") to save typing-in the right hand side of a piped link for several kinds of wikilinks. The advantage is fewer typos when writing or editing wikitext. When the last, wikitext, character of a link is the pipe character, the pipe trick changes the display characteristics of that link. When the link title contains a comma or colon or ends with a parenthesized term, then the wiki software (running on Wikipedia servers) transforms the wikitext you typed in (from your browser or editor) before it stores the wikitext on the server for later display. It's mostly used to disappear the parenthesized part of the link title, but it also has effects on commas in the title and colons forming the namespaces. It does not have effects on the number sign ("
[edit] ExamplesThis may be hard to follow, so please see the examples:
[edit] CombinationsThe basic rule when the pipe trick is used, is that an (initial) namespace prefix, a final part beginning with a comma, or a final parenthesis (usually intended for disambiguation) is suppressed in the rendering of the link. In case of combinations of suppressible parts, the following rules apply: [edit] Parentheses beat commasIf the link name involves both one or more commas and a final parenthesis, only the parenthesis is suppressed: is shown on the page as: [edit] Only one prefix suppressedIf there are several prefixes, which can occur, for example, for a transwiki link, only the first is suppressed: is rendered as: [edit] The first comma countsIf there are several commas, only the part up to the first comma is shown: results in: [edit] Other combinationsFor the rest, if there is both an initial part and a final part that can be omitted, both are suppressed: produces: [edit] Where it does not work[edit] Cite.php <ref> footnotesThe trick does not work when enclosing between "ref" tags. renders in the references list (generated by the <references/> tag) as:
[edit] Edit summariesThe trick does not work in edit summaries. (→Edit summaries and the pipe trick: as tested in WP:SAND) [edit] Section linksThe pipe trick does not work on section links, and in general it does not work for links to anchors (links that use a
[edit] Slash trickYou can achieve the same effect for subpages by adding a slash: This trick only works in namespaces where [edit] Reverse pipe trickIf the title of the article containing the link includes a parenthesized term or a comma, placing a pipe at the start of the link will append the corresponding text. For example, if the link [[|Agonizer]] were placed in Agonist (disambiguation), the link would to be expanded to [[Agonizer (disambiguation)|Agonizer]]. Using the reverse pipe trick on an article that has no parentheses or comma in its title is unproductive; the pipe character is automatically removed. The reverse pipe trick does not work with colons. [edit] Try it!The best way to understand this is to try it yourself in the sandbox. Use one of the examples under "Type this" above, save the page, then immediately edit it again. You'll see the transformation, and it should be clearer exactly what happened. [edit] See also | |||||||||||||||||||||||||||||||||||||
| ↑ top of page ↑ | about thumbshots |