Help:Pipe switch: Difference between revisions
m (upholding T:CLEAN CODE) |
|||
Line 1: | Line 1: | ||
A '''pipe switch''' is a specific kind of [[ | A '''pipe switch''' is a specific kind of [[Help:wiki markup|wiki markup]]. It allows you to differentiate between the article name being linked, and the article name being displayed. This allows for greater flexibility in writing style. | ||
==What's a pipe?== | == What's a pipe? == | ||
In order to use the pipe switch, you must first know what a ''pipe'' is. | In order to use the pipe switch, you must first know what a ''pipe'' is. The pipe is a special symbol on your keyboard which is a straight vertical line. It is produced on standard English-language keyboards by '''holding down the shift key''', and then pressing the '''rightmost key of the row containing the QWERTY keys'''. | ||
==Okay, what's a pipe switch?== | == Okay, what's a pipe switch? == | ||
Here's a common example: | Here's a common example: | ||
<pre>In [[Castrovalva (TV story)|his initial adventure]], the [[Fifth Doctor]] unravelled [[Fourth Doctor|his predecessor]]'s [[the Doctor's scarf|scarf]].</pre> | <pre>In [[Castrovalva (TV story)|his initial adventure]], the [[Fifth Doctor]] unravelled [[Fourth Doctor|his predecessor]]'s [[the Doctor's scarf|scarf]].</pre> | ||
Line 8: | Line 8: | ||
:In [[Castrovalva (TV story)|his initial adventure]], the [[Fifth Doctor]] unravelled [[Fourth Doctor|his predecessor]]'s [[the Doctor's scarf|scarf]]. | :In [[Castrovalva (TV story)|his initial adventure]], the [[Fifth Doctor]] unravelled [[Fourth Doctor|his predecessor]]'s [[the Doctor's scarf|scarf]]. | ||
In pipe switching, then, the phrase before the pipe — that is, the character that looks like a straight, vertical line (|) — is the actual name of the article to which you are linking. | In pipe switching, then, the phrase before the pipe — that is, the character that looks like a straight, vertical line (|) — is the actual name of the article to which you are linking. The phrase '''after''' the pipe is the way the link will display once you publish the article. | ||
==Not quite a pipe ''trick''== | == Not quite a pipe ''trick'' == | ||
The pipe switch is related to the [[Help:wiki markup#The "pipe trick"|pipe ''trick'']], but the two should not be confused. | The pipe switch is related to the [[Help:wiki markup#The "pipe trick"|pipe ''trick'']], but the two should not be confused. Pipe tricking is a slightly more advanced form of pipe switching. Pipe tricking has to do with linking to a [[Tardis:disambiguation policy|disambiguated]] title quickly. | ||
If your title is<pre>[[The Mutants (comic story)]]</pre> | If your title is<pre>[[The Mutants (comic story)]]</pre> | ||
then you can use a pipe trick to link to just the words "The Mutants", without having to type "The Mutants" twice. Type: | then you can use a pipe trick to link to just the words "The Mutants", without having to type "The Mutants" twice. Type: | ||
<pre>[[The Mutants (comic story)|]]</pre> | <pre>[[The Mutants (comic story)|]]</pre> | ||
and the {comic story) will be automatically removed, leaving you with ''[[The Mutants (comic story)|The Mutants]]''. | and the {comic story) will be automatically removed, leaving you with ''[[The Mutants (comic story)|The Mutants]]''. | ||
There are many more variations of pipe tricking possible. | There are many more variations of pipe tricking possible. They're covered in greater detail at [[Help:Wiki markup]]. | ||
[[ | |||
[[Category:Help]] |
Revision as of 03:59, 7 November 2011
A pipe switch is a specific kind of wiki markup. It allows you to differentiate between the article name being linked, and the article name being displayed. This allows for greater flexibility in writing style.
What's a pipe?
In order to use the pipe switch, you must first know what a pipe is. The pipe is a special symbol on your keyboard which is a straight vertical line. It is produced on standard English-language keyboards by holding down the shift key, and then pressing the rightmost key of the row containing the QWERTY keys.
Okay, what's a pipe switch?
Here's a common example:
In [[Castrovalva (TV story)|his initial adventure]], the [[Fifth Doctor]] unravelled [[Fourth Doctor|his predecessor]]'s [[the Doctor's scarf|scarf]].
This produces:
- In his initial adventure, the Fifth Doctor unravelled his predecessor's scarf.
In pipe switching, then, the phrase before the pipe — that is, the character that looks like a straight, vertical line (|) — is the actual name of the article to which you are linking. The phrase after the pipe is the way the link will display once you publish the article.
Not quite a pipe trick
The pipe switch is related to the pipe trick, but the two should not be confused. Pipe tricking is a slightly more advanced form of pipe switching. Pipe tricking has to do with linking to a disambiguated title quickly.
If your title is
[[The Mutants (comic story)]]
then you can use a pipe trick to link to just the words "The Mutants", without having to type "The Mutants" twice. Type:
[[The Mutants (comic story)|]]
and the {comic story) will be automatically removed, leaving you with The Mutants.
There are many more variations of pipe tricking possible. They're covered in greater detail at Help:Wiki markup.