Template:PipeTrick

From AtlasWiki
Revision as of 14:47, 12 May 2014 by TheodoreMurdock (Talk | contribs) (removing #es)

Jump to: navigation, search

This template creates a link that uses the pipe trick if and only if the pipe trick can be used.

i.e., the pipe trick is valid to be used for a link such as XCSG:Node, producing Node because the article is in a namespace.

Similarly, the pipe trick is valid to be used for a link such as DataFlow (Node), producing DataFlow, because that page has a parenthetical disambiguation.

However, the pipe trick will not work for a link that does not have anything to remove, such as Node, and adding a pipe will break the link, giving Node.

Since we can't always tell in templates whether a pipe trick is needed, this template can be called instead, to determine whether the pipe trick is possible, and produce a link with the pipe trick if it is, or without the pipe trick if attempting the pipe trick would break the link. [[{{{1}}}|]]