Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Numinix MediaWiki Demo
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Help/Links
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Pipe trick=== <!--T:180--> <!--T:181--> If the part after the <tvar name=2><code>|</code></tvar> in a piped link is left empty, it is to an abbreviated form of the page name on the left, based on the following rules: </translate> #<translate><!--T:182--> Any word that is before the '''first colon (:)''', as well as the colon character itself, is removed.</translate> <translate><!--T:183--> This word may or may not be a 'namespace' prefix (such as "Help:") or an 'interwiki' prefix (such as "commons:").</translate> <translate><!--T:184--> If the name of the page is preceded by a colon (:), "first" refers to "first after this".</translate> #<translate><!--T:185--> If there is some text in the '''parentheses''' at the end, then it will be removed.</translate> #<translate><!--T:186--> If there are no parentheses, but there is a '''comma''' (,) character, the comma and everything after it is removed.</translate> #<translate><!--T:187--> Note that this does not work for '''sections/anchors''' as <tvar name="1"><code><nowiki>[[Help:Piped_link#Pipe_trick|]]</nowiki></code></tvar> outputs <tvar name="2">[[Help:Piped_link#Pipe_trick|]].</tvar></translate> <translate> <!--T:188--> Similar to using the three or four tildes when signing on Talk pages, and using 'subst', in a preview, the result shows up in the preview itself, but the conversion in the edit box is not shown yet. Click on the <tvar name=1><code></code></tvar> option to see the change in the wikitext. =====Examples===== <!--T:189--> </translate> * <translate><!--T:190--> <tvar name=1><code><nowiki>[[Help:Template|]]</nowiki></code></tvar> is converted to <tvar name=2><nowiki>[[Help:Template|Template]]</nowiki></tvar>, which is shown as <tvar name=3>[[Help:Template|Template]]</tvar></translate> * <translate><!--T:191--> <tvar name="1"><code><nowiki>[[Music: My life|]]</nowiki></code></tvar> is converted to <tvar name="2"><nowiki>[[Music: My life| My life]]</nowiki></tvar>, which is shown as <tvar name="3">[[Music: My life| My life]]</tvar> - although "Music:" itself is not a namespace (therefore the space after the colon character is not automatically removed), however, the shortcut works anyway</translate> * <translate><!--T:192--> <tvar name="1"><code><nowiki>[[w:en:Pipe (computing)|]]</nowiki></code></tvar> is converted to <tvar name="2"><nowiki>[[w:en:Pipe (computing)|en:Pipe]]</nowiki></tvar>, which is shown as <tvar name="3">[[w:en:Pipe (computing)|en:Pipe]]</tvar>.</translate> * <translate><!--T:193--> <tvar name="1"><code><nowiki>[[commons:Boston, Massachusetts|]]</nowiki></code></tvar> is converted to <tvar name="2"><nowiki>[[commons:Boston, Massachusetts|Boston]]</nowiki></tvar>, which is shown as <tvar name="3">[[commons:Boston, Massachusetts|Boston]]</tvar>.</translate> *<translate><!--T:194--> <tvar name="1"><code><nowiki>[[w:}|]]</nowiki></code></tvar> ''does not'' give <tvar name="2"><nowiki>[[w:}|}]]</nowiki></tvar>, and calling the template with a value of parameter 1 gives a working link, but in the case of substitution only.</translate> *<translate><!--T:195--> <tvar name="1"><code><nowiki>[[w:en:|]]</nowiki></code></tvar> ''does not'' give <tvar name="2"><nowiki>[[w:en:|en:]]</nowiki></tvar> and <tvar name="3"><code><nowiki>[[m:|]]</nowiki></code></tvar> ''does not'' give <tvar name="4"><nowiki>[[m:|]]</nowiki></tvar></translate> *<translate><!--T:196--> <tvar name="1"><code>[[Wikipedia:Village pump (technical)#Pipe trick|]]</code></tvar> is not converted, so it does not give a working link.</translate> {| | <translate><!--T:197--> This wikitext</translate> | <translate><!--T:198--> Produces</translate> |- | <syntaxhighlight lang="wikitext"> * [[project:a (b)|a]] * [[w:project:a (b)|project:a]] * [[:de:project:a (b)|project:a]] * [[wiktionary:project:a (b)|project:a]] * [[wiktionary:de:project:a (b)|de:project:a]] * [[wikibooks:project:a (b)|project:a]] * [[wikiquote:project:a (b)|project:a]] * [[wikisource:project:a (b)|project:a]] * [[wikisource:project:a (b)#c|]] * [[w:en:|en:]] [[w:en:|en:]] * [[m:|m:]] [[m:|m:]] </syntaxhighlight> | * [[project:a (b)|a]] * [[w:project:a (b)|project:a]] * [[:de:project:a (b)|project:a]] * [[wiktionary:project:a (b)|project:a]] * [[wiktionary:de:project:a (b)|de:project:a]] * [[wikibooks:project:a (b)|project:a]] * [[wikiquote:project:a (b)|project:a]] * [[wikisource:project:a (b)|project:a]] * [[wikisource:project:a (b)#c|]] * [[w:en:|en:]] [[w:en:|en:]] * [[m:|m:]] [[m:|m:]] |} <translate> =====Category tag===== <!--T:199--> <!--T:200--> Since the sortkey syntax of the category is similar to a piped link, the pipe trick also works for category tags, even though technically, it is not useful there. ====Limitation==== <!--T:201--> </translate> * <translate><!--T:202--> <tvar name="1"><nowiki>[[Help:Lk|]]</nowiki></tvar> using <tvar name="2">[[template:tc]]</tvar> is not converted, so the result is rendered as <tvar name="3">[[Help:Lk|Lk]]</tvar> which is not as a working link.</translate> <translate><!--T:203--> This is because like substitution, the pipe trick expansion occurs before ordinary expansion of the templates, etc.</translate> <translate><!--T:204--> The pipe trick does not work if the linked page includes invalid characters.</translate> <translate><!--T:205--> Therefore, while ordinarily the acceptability of the target page name is assessed after template expansion, the pipe trick expansion judges it before that.</translate> <translate><!--T:206--> The braces are therefore considered invalid characters in the page name.</translate> <translate><!--T:207--> Instead, a template can be used like <tvar name="1">[[template:pipe trick]]</tvar>: <tvar name="2"><nowiki>k}}</nowiki></tvar> which renders as <tvar name="3">k}}</tvar>.</translate> <translate> ====Inverse pipe trick==== <!--T:208--> <!--T:209--> On page "<tvar name="1">A (c)</tvar>", <tvar name="2"><nowiki>[[|b]]</nowiki></tvar> is converted to <tvar name="3"><nowiki>[[b (c)|b]]</nowiki></tvar> automatically. <!--T:210--> Similarly, on page "<tvar name="1">A, c</tvar>", <tvar name="2"><nowiki>[[|b]]</nowiki></tvar> is converted to <tvar name="3"><nowiki>[[b, c|b]]</nowiki></tvar> automatically.
Summary:
Please note that all contributions to Numinix MediaWiki Demo may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Project:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)