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
Incubator escapee wiki:Piped link
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!
{{Short description|Wikipedia how-to guide}} {{About||the use of piping on disambiguation pages|Wikipedia:Manual of Style/Disambiguation pages#Piping and redirects}} {{About||the pipe trick in links (such as <nowiki>[[Wikipedia:Example|]]</nowiki>|Help:Pipe trick}} {{See also|Wikipedia:Manual of Style/Linking#Piped links}} {{Wikipedia how-to|WP:PIPE|WP:PIPELINK}} {{Linking and page manipulation|Linking and diffs}} A '''piped link''' is an internal [[WP:Links|link]] that displays text different from the title of the page to which the text links. It is created with [[WP:Wikitext|wikitext]] (markup code) that results in [[hyperlink|hyperlinked]] (underlined, clickable) text. It is called "piped" because it uses the [[pipe character]] ("{{code|{{!}}}}") or vertical bar. For example, the wikitext <code><nowiki>[[train station|station]]</nowiki></code> displays as [[train station|station]] but links to the Wikipedia article about [[train station]]s. [[WP:Manual of Style/Disambiguation pages#Piping and redirects|Do not confuse piped links and redirects]]: they are two very different mechanisms. Both allow the displayed text of a link to differ from the title of the final destination page (the page that a reader will see after clicking that link). However, a piped link conceals the destination page's title ''only'' in that single line on the single page where its wikitext is used, while on any page throughout Wikipedia any link, piped or not, to a specific redirect page will always lead to the same destination page. == Use == {{Main|Help:Piped link}} {{see also|Wikipedia:Manual of Style/Linking#Piped links}} Piped links are useful for preserving the grammatical structure and flow of a sentence when: # the wording of the exact link title does not fit in context (see [https://en.wikipedia.org/wiki/Cetacea#:~:text=Cetaceans%20have%20been%20extensively%20hunted%20for%20their%20meat here] as an example), or # there are multiple meanings of the word (see "[[Mercury]]" example on the [[WP:Disambiguation|Disambiguation]] page). The pipe ("'''|'''") character is also known as a [[vertical bar]]. There are two ways to create the pipe ("'''|'''") character: using the keyboard or choosing from a list of symbols. On English-layout keyboards, you may press {{keypress|Shift|\}}. On Spanish keyboards, the pipe character can be obtained by pressing {{keypress|AltGr|1}}. On French (AZERTY) keyboards, the pipe character can be obtained by pressing {{keypress|AltGr|6}}. Or note that, when you are in "edit this page" mode, the "pipe" appears as the third character in the "'''Wiki markup'''" section at the bottom of the page, among the list of symbols. (You may need to choose "Wiki markup" on the pull-down menu.) Clicking on the pipe symbol ''there'' inserts it at the cursor spot, just as happens for any symbol chosen from this page. For full details on how to use this feature, see '''[[Help:Piped link]]'''. == When not to use == {{Shortcut|WP:NOPIPE|WP:NOPIPEDLINK}} {{Anchor|NOT}}<!-- for quick access via [[WP:PIPE#NOT]] --> {{Redirect|WP:NOPIPE|the Manual of Style guideline|MOS:NOPIPE|the guidance against using pipes on disambiguation pages|MOS:DABPIPE}} First of all, keep links as simple as possible: * Avoid making links longer than necessary: {{block indent| {{xmark|15}} <code>{{!mxt|<nowiki>[[George Washington|President George Washington]]</nowiki>}}</code> {{tick|15}} <code>{{mxt|<nowiki>President [[George Washington]]</nowiki>}}</code> }} * It is generally not good practice to pipe links simply [[Wikipedia:Redirect#Do not "fix" links to redirects that are not broken|to avoid redirects]]: {{block indent| {{xmark|15}} <code>{{!mxt|<nowiki>[[Wolfgang Amadeus Mozart|Mozart]]</nowiki>}}</code> {{tick|15}} <code>{{mxt|<nowiki>[[Mozart]]</nowiki>}}</code> }} : Unnecessary piping makes the [[Help:Wikitext|wikitext]] harder to read. : Furthermore, the number of links to a redirect page can be a useful gauge of when it would be helpful to spin off a subtopic of an article into its own page, and such links would also continue to work correctly after the spin-off. : For example: <code><nowiki>[[Leningrad]]</nowiki></code> currently redirects to [[Saint Petersburg]], but one day it could be decided to spin off a dedicated article about the old city of Leningrad; when that happens, all existing links <code><nowiki>[[Leningrad]]</nowiki></code> will automatically point to the correct article, while the unnecessarily piped ones <code><nowiki>[[Saint Petersburg|Leningrad]]</nowiki></code> will point to the wrong place. * Characters (up to punctuation) suffixed to a link will be "blended" as part of the displayed hyperlink, despite not being inside the double brackets, making it unnecessary to use piping only because the linked article name is only the first part of the word. Typical examples include a plural form or trailing [[affix]]. Given an option between pipe a link and "blending" a suffix, preferred style is to use a blended suffix: {{block indent| {{xmark|15}} <code>{{!mxt|<nowiki>[[public transport|public transportation]]</nowiki>}}</code> {{tick|15}} <code>{{mxt|<nowiki>[[public transport]]ation</nowiki>}}</code> }} * In a link, the first letter of a page title (after the namespace prefix) is never case-sensitive. This means: It is not necessary to pipe a link to convert the first letter to lower case. So, never do this: {{block indent| {{xmark|15}} <code>{{!mxt|<nowiki>[[Public transport|public transport]]</nowiki>}}</code> {{tick|15}} <code>{{mxt|<nowiki>[[public transport]]</nowiki>}}</code> }} : Both correctly link to the article [[Public transport]]. == Transparency <span class="anchor" id="EGG"></span> == {{redirect|WP:EASTEREGG|text=You may also be looking for [[MOS:EGG]]}} {{Anchor|Intuitiveness}} {{Shortcut|WP:TRANSPARENCY|WP:EASTEREGG|WP:RICKROLL|WP:TROJANHORSE}} [[File:Adventkalender AR.jpg|thumb|upright|Wikipedia is not an [[advent calendar]], so don't tease the reader.]] Keep piped links as transparent as possible and follow the [[WP:ASTONISH|principle of least astonishment]]. Do not use piped links to create "[[Easter egg (media)|Easter egg]]" links that require the reader to open them (or, at least, to hover their mouse pointer on those links to get [[mw:page previews|page previews]] in the form of [[mw:Extension:Popups|navigation popups]]) before understanding where they lead. Wikipedia is not an [[Advent calendar]]. Also remember there are people who '''print''' the articles. For example, do not write this: {{!mxt|... and by mid-century the puns and sexual humor were (with only a few <nowiki>[[Thomas Bowdler|exceptions]]</nowiki>) back in to stay.}} The readers will not see the hidden reference to [[Thomas Bowdler]] unless they click or hover over the piped [[Thomas Bowdler|exceptions]] link. In a print version, there is no link to select, and the reference is lost. Instead, reference the article explicitly: {{mxt|... and by mid-century the puns and sexual humor were (with only a few exceptions, such as <nowiki>[[Thomas Bowdler]]</nowiki>) back in to stay.}} Similarly, instead of: {{!mxt|After an <nowiki>[[1944 Bombay explosion|earlier disaster]]</nowiki> ...}} consider: {{mxt|After an earlier disaster, the <nowiki>[[1944 Bombay explosion]]</nowiki>, ...}} or simply: {{mxt|After the <nowiki>[[1944 Bombay explosion]]</nowiki>, ...}} It will occasionally be useful to link to a fuller explanation of a phrase; when this is done, '''link the phrase, not a single word'''. For example: If Pontiac's War is defined as having been : a war launched in 1763 by a loose confederation of elements of Native American tribes, and there is no space for further explanation in that context (this is a quote from the lead of the article), then some readers will value a link to a description of the confederation. This should ''not'' be linked from the word confederation; the link in the following phrase: : {{!xt|a war launched in 1763 by a loose [[Pontiac's Rebellion#Origins|confederation]] of elements of Native American tribes}} looks like a link to the article [[Confederation]]. At a minimum, link something that, obviously, wouldn't be the title of an article under [[WP:Article titles|our article title conventions]]: : {{xt|a war launched in 1763 by a [[Pontiac's Rebellion#Origins|loose confederation of elements]] of Native American tribes.}} Further, it is inappropriate to contain '''veiled''' and uncited '''interpretations''' of fiction through piped links, as in this excerpt from the ''[[The Iron Dream]]'' article, which contained over 30 interpretations of the book's allusions hidden in links: : {{!xt|The pure and strong young [[breeding true|"Trueman"]] (so named for the lack of mutations in his [[DNA]]) Feric Jaggar returns from the outlands of [[Austria|Borgravia]] where his family was exiled by the [[Treaty of Versailles|Treaty of Karmak]] with the [[Allies of World War I|surrounding mutant states]] ...}} ... and in wikitext: <nowiki>The pure and strong young [[breeding true|"Trueman"]] (so named for the lack of mutations in his [[DNA]]) Feric Jaggar returns from the outlands of [[Austria|Borgravia]] where his family was exiled by the [[Treaty of Versailles|Treaty of Karmak]] with the [[Allies of World War I|surrounding mutant states]] ...</nowiki> Such interpretation, if [[WP:Citing sources|properly sourced]], should be placed in its own section and citations provided. If the interpretation is purely that of the editor, it is [[WP:No original research|original research]] and should be removed. == Piped category links == {{Main|WP:SORTKEY}} In the case of a [[WP:Categorization|category]] link, a piped link overrides the alphabetical sort order of the article, as shown on the linked category page. For example, in a hypothetical new article [[Albert Einstein]], using <code><nowiki>[[Category:Quantum physicists]]</nowiki></code> places him in [[:Category:Quantum physicists]]. And that category page will list him as "Albert Einstein". But if this link is used in this simplest form, it will list the title ([[wp:lemma|lemma]]) among the "A"s, instead of the "E"s (where he belongs), because it sorts on the article's name, "Albert Einstein". One way to impose correct sort order is to use <code><nowiki>[[Category:Quantum physicists|Einstein, Albert]]</nowiki></code>, which makes that category page list "Albert Einstein" among the "E"s, by sorting it ''as if'' it were "Einstein, Albert" rather than "Albert Einstein". However, the ''actual'' [[Albert Einstein]] page has dozens of category links. Piping every category link would be unattractive. As is standard for most "person" pages, that page uses the [[Wikipedia:template|template]] <code><nowiki>{{DEFAULTSORT:Einstein, Albert}}</nowiki></code> to override the default sorting for category links. Thus <code><nowiki>[[Category:Quantum physicists]]</nowiki></code> on that page, places him in [[:Category:Quantum physicists]] as "Albert Einstein", ''and'' makes that category page sort him as "Einstein, Albert", without need of a piped link, and likewise for 81 other category links. But because of this template that page ''needs'' to ''pipe'' the category link, <code><nowiki>[[Category:Einstein family|Albert]]</nowiki></code>, to place him in [[:Category:Einstein family]] ''and'' make (only) that category alphabetize him under "Albert". == Templates == The pipe character is also used when supplying parameters to [[Help:Template|templates]]; this is not the same thing as a piped link. Some templates automatically add link formatting, [https://en.wikipedia.org/w/index.php?title=Grammy_Awards&oldid=1276967913 as seen here] with the previous_awards field. Those automatic links won't work with the normal piped links, so for them instead of a normal pipe you should use these five characters: {{t|!}} to call the [[Template:!]], [https://en.wikipedia.org/w/index.php?title=Robin_Boyd_Award&oldid=1203220725 as seen here] with the current_awards field. == See also == * [[Help:Pipe trick]] * [[Help:Link]] * [[Help:Editing]] * [[Wikipedia:FAQ/Editing#How do I make links?|Editing FAQ: How do I make links?]] * {{tl|Pipe}} {{Wikipedia help pages}} [[Category:Wikipedia how-to|{{PAGENAME}}]] [[Category:Wikipedia link help]]
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)
Pages transcluded onto the current version of this page
(
help
)
:
Template:!mxt
(
edit
)
Template:!xt
(
edit
)
Template:About
(
edit
)
Template:Anchor
(
edit
)
Template:Block indent
(
edit
)
Template:Code
(
edit
)
Template:Keypress
(
edit
)
Template:Linking and page manipulation
(
edit
)
Template:Main
(
edit
)
Template:Mxt
(
edit
)
Template:Redirect
(
edit
)
Template:See also
(
edit
)
Template:Short description
(
edit
)
Template:Shortcut
(
edit
)
Template:T
(
edit
)
Template:Template link
(
edit
)
Template:Tl
(
edit
)
Template:Wikipedia help pages
(
edit
)
Template:Wikipedia how-to
(
edit
)
Template:Xt
(
edit
)