Wikia

GTA Wiki

Help:Pipe trick

Talk0
10,210pages on
this wiki
Revision as of 08:18, September 10, 2010 by Gta-mysteries (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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
  • 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. It affects only what is displayed on the page, not where the link goes. After you save the page, the software adds the displayed text 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]].

Combinations

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

Further help and feedback

Around Wikia's network

Random Wiki