Help:Piped linkedit

From WoWWiki

HELP CONTENTS · Getting Started · New to WoWWiki · Editing WoWWiki · Editing WoWWiki (advanced) · The WoWWiki Community · Additional Help
See Wikia Help for general Wikia- and wiki- related help. See http://meta.wikimedia.org/ Meta-Wiki HelpIntro for basic MediaWiki usage!

A piped link is a link that is labeled differently from the name of the page it links to. This allows linking a word or phrase within the context of a page's text rather than using "see also." With a suitable browser and depending on the preferences set, one can still see what page is linked to: when you hover your cursor over the link, it will show the true target.

Using piped links in this way is called creating a "clean link."

Usage

First, let's start with an example:

[[World of Warcraft|WoW]]
will show: WoW

The term "piped" refers to the use of the pipe character "|" used to separate the link text from the actual link. Piped links are generally used in situations where the link's actual target doesn't fit into the context of the sentence or you want to use a slightly different word.

Keep in mind, there are other methods besides pipes to use when creating different links.See Help:Editing for more information.

Shortcuts

Pipes can also be used as shortcuts when dealing with complex links containing parentheses or namespaces.

If you leave the link text (the text that normally goes after the pipe) empty, the link is converted to an abbreviated form of the target link, as follows:

  • If your link contains a namespace, the leftmost colon and any text to the left of that is removed.
  • If there is a text in parentheses at the end, it will be removed.

An example:

[[Help:Link|]]
will show: Link

Also:

[[Guilds (disambiguation)|]]
will show: Guilds

You can also do both at the same time:

[[Quest:Weaken the Ramparts (Alliance)|]]
will show: Weaken the Ramparts

Just like for the three or four tildes when signing on Talk pages, and the use of subst, the result already shows up in the preview itself but the conversion in the edit box is not yet shown. When you save and press edit again, you will see the properly rendered wikitext.

Using a redirect as an alternative

An alternative is linking directly to a page you know will redirect to the proper one. This is sometimes preferable if you know the redirect page exists and you don't want to type out the whole link. Policies all have redirect pages, such as WW:NPOV. (Keep in mind, you can also type [[WW:NPOV|]] to show NPOV.

This method has a few drawbacks, mainly that the popup does not show the final page one will arrive at. A redirect also has a slight performance hit to the server, since the server has to generate and send two pages. However, these are minor and shouldn't heavily affect your decision to use redirects or piped links.

Contents

By adding a pipe or vertical bar ("|" -- Shift + Backslash on most keyboards) before the closing brackets in certain links, you can hide:

  • namespaces and other prefixes that use commas,
  • clarifying words in parentheses, or
  • words after commas.

(This is a variation on the original use of the pipe by which you type the desired display after the pipe.)

The pipe trick is helpful for when you want to link to a page from within a sentence without using the full page name. This is especially good for lengthy pages.

It affects only what is displayed on the page, not where the link goes. After you save the page, the software adds the display to the code.

Since the pipe trick can be hard to follow, it is best illustrated through the following examples:

The types

Namespace or other prefix that precedes a colon

Everything up to the (first) colon is hidden:

  • [[Project:Something|]] is converted to [[Project:Something|Something]].
  • [[w:Category:Something|]] is converted to [[w:Category:Something|Category:Something]].

For example:

Bracket and what follows

  • [[Someone (author)|]] is converted to [[Someone (author)|Someone]].
  • [[Someone (clown)|]] is converted to [[Someone (clown)|Someone]].

Comma and what follows

  • [[Some City, Some State|]] is converted to [[Some City, Some State|Some City]].

Combination of prefix with one of the others

A prefix will be hidden in addition to a comma or bracket expression.

Parentheses take precedence over commas

Where a link has a comma (or more than one) and a final parenthesis, only the parenthesis disappears:

  • [[Category:Yours, Mine and Ours (1968 film)|]] becomes [[Yours, Mine and Ours (1968 film)|Yours, Mine and Ours]]

Notes

  • The pipe trick does not work for external links; the equivalent code, a space, must have the desired display typed or pasted after it.
  • It does not work in: section links; edit summaries; references defined by "ref" tags.
  • Pipes work differently with categories, defining the listing order.

See also