Help:Piped link
Help: | Contents | Getting Started | New to BRWiki | Editing BRWiki | Editing BRWiki (advanced) | Communication and Community | Additional Help |
The help pages are currently being redesigned so they are more helpful. If you have any comments or are interested in helping out, please see the help team. |
This article or section needs to be cleaned up to a higher standard of quality.
style="Template:stub explanationcss;" |
This may include editing to correct spelling and grammar, rewriting sections to ensure they are clear and concise, and wikifying.
This may include editing to correct spelling and grammar, rewriting sections to ensure they are clear and concise, and wikifying.
For instance:
class="bbcode_container" |
will show: How to set up a coffee houseCode:
[noparse][[coffeehouse setup|How to set up a coffee house]][/noparse]
The term "piped" refers to the use of the pipe character "|" used to separate the good description from the actual link. The term is named after an alternative use of it, see Pipe (computing).
Another example would be [[train station|station]], showing up as station. This is useful where the word "station" is used in an article on trains; from the context it would be clear that a train station is meant. The piped link is more convenient to the user than a link station to the disambiguation page.
[top]Using a redirect as an alternative
An alternative is simply using [[How to setup a coffee house]], showing up as How to setup a coffee house (note the difference in what pops up when you point at it, if applicable for your browser), and making How to setup a coffee house a redirect page.
This is convenient if the redirect is already there, or will also be of use elsewhere, but has a few drawbacks:
[list][*]the popup does not show the page one will arrive at
[*]"Related changes" does not give the changes in that page, but in the redirect page
[*]the redirect message on the new page slightly clutters it
[/redirect]
On the other hand, one may prefer the link title to provide some information that is not in the name of the page one links to, such as the value of a unit in terms of other units. In that case one can make a page whose pagename is the info one wants in the link title, and which redirects to a page with a more appropriate name. See e.g. w:Template:Ft, containing [[30.48 cm|ft]], with the page w:30.48 cm redirecting to w:Foot (unit of length).
This is convenient if the redirect is already there, or will also be of use elsewhere, but has a few drawbacks:
[list][*]the popup does not show the page one will arrive at
[*]"Related changes" does not give the changes in that page, but in the redirect page
[*]the redirect message on the new page slightly clutters it
[/redirect]
On the other hand, one may prefer the link title to provide some information that is not in the name of the page one links to, such as the value of a unit in terms of other units. In that case one can make a page whose pagename is the info one wants in the link title, and which redirects to a page with a more appropriate name. See e.g. w:Template:Ft, containing [[30.48 cm|ft]], with the page w:30.48 cm redirecting to w:Foot (unit of length).
[top]Automatic conversion of the wikitext (pipe trick)
If in a piped link the part after the "|" is left empty, it is converted to an abbreviated form of the page name on the left, as follows:
[list][*]if there is a colon in it, the leftmost colon and anything to the left of that is removed (but this does not work for "MediaWiki User's Guide:", apparently due to the apostrophe)
[*]if there is a text in parentheses at the end it will be removed
[/redirect]
For example, the wikitext [[en:Pipe (computing)|]] is converted to [[en:Pipe (computing)|Pipe]], which is rendered as Pipe, and [[Help:Template|]] is converted to [[Help:Template|Template]], rendered as Template.
Just like for the three or four tildes when signing on Talk pages, and the use of subst, in a preview, the result already shows up in the preview itself, but the conversion in the edit box is not yet shown. Save and press Edit again to see the result of the conversion.
For links between language versions of Wikipedia and between language versions of Wiktionary, either the pipe trick is not applicable (if the link comes at the edge) or is limited in use because of the starting colon.
In some projects and some cases the pipe trick does not work and the piped link wikitext is not even rendered as a link.
[list][*]if there is a colon in it, the leftmost colon and anything to the left of that is removed (but this does not work for "MediaWiki User's Guide:", apparently due to the apostrophe)
[*]if there is a text in parentheses at the end it will be removed
[/redirect]
For example, the wikitext [[en:Pipe (computing)|]] is converted to [[en:Pipe (computing)|Pipe]], which is rendered as Pipe, and [[Help:Template|]] is converted to [[Help:Template|Template]], rendered as Template.
Just like for the three or four tildes when signing on Talk pages, and the use of subst, in a preview, the result already shows up in the preview itself, but the conversion in the edit box is not yet shown. Save and press Edit again to see the result of the conversion.
For links between language versions of Wikipedia and between language versions of Wiktionary, either the pipe trick is not applicable (if the link comes at the edge) or is limited in use because of the starting colon.
In some projects and some cases the pipe trick does not work and the piped link wikitext is not even rendered as a link.
[top]Examples
class="bbcode_container" |
giveCode:
*[[project:a (b)|]]
*[[w:project:a (b)|]]
*[[de:project:a (b)|]]
*[[wiktionary:project:a (b)|]]
*[[wiktionary:de:project:a (b)|]]
*[[wikibooks:project:a (b)|]]
*[[wikiquote:project:a (b)|]]
*[[wikisource:project:a (b)|]]
[list][*]a
[*]project:a
[*]project:a
[*]project:a
[*]de:project:a
[*]project:a
[*]project:a
[*]project:a
[/redirect]
[top]Syntax for external links
For external links a space is used instead of a pipe character, see Editing. A general term used for both is also clean link.
Contributors: | ,
Created by Last edited by , 10-23-2011 at 03:02 PM 0 Comments, 3,716 Views |
, 11-26-2006 at 11:28 AM
Bookmarks