Help talk:Piped link

From Meta, a Wikimedia project coordination wiki
Jump to: navigation, search

Enhanced pipe trick[edit]

In the interests of maximizing efficiency (or laziness, depending on your perspective), shouldn't the pipe trick get rid of all prepended words?

Or, better yet, multiple pipes should get rid of multiple words, like so:

[[Wikipedia:en:Wikipedia:test]] --> Wikipedia:en:Wikipedia:test

[[Wikipedia:en:Wikipedia:test|]] --> en:Wikipedia:test

[[Wikipedia:en:Wikipedia:test||]] --> Wikipedia:test

[[Wikipedia:en:Wikipedia:test|||]] --> test

Not sure where in this heirarchy parenthetical expressions should be removed...

- Omegatron 15:29, 12 Mar 2005 (UTC)

I think the pipe trick should always remove all text left of a colon, which I would imagine is what is usually desired, since usually there is only one colon.
Does it even occur that often, anyway, that there are multiple colons and the user wants to preserve some (but not all of them)? This seems like a niche case. I would imagine that most of the time, the desired behavior is to keep all of them or none of them. 66.93.12.67 18:25, 4 April 2006 (UTC)
You're probably right. It should remove everything left of the colon. The multiple pipes could be used to preserve more than one prefix. — Omegatron 15:16, 6 October 2006 (UTC)

Contradiction in pipe trick example[edit]

The article says:

[[w:en:Pipe (computing)|]] is converted to [[w:en:Pipe (computing)|Pipe]]

But this contradicts "the leftmost colon and anything to the left of that is removed", which make it

[[w:en:Pipe (computing)|]] is converted to [[w:en:Pipe (computing)|en:Pipe]]

66.93.12.67 18:26, 4 April 2006 (UTC)

Thanks, I fixed it.--Patrick 22:44, 4 April 2006 (UTC)

With Tables[edit]

Is there a way to use piped links in tables without closing the row? 128.122.253.212 14:53, 22 March 2006 (UTC)

Use a template similar to en:Template:!. --Eleassar my talk 12:38, 27 December 2006 (UTC)

Leading space in a page name[edit]

Re diff: as I understand it leading spaces are forbidden in page names. (namespace names as well as the first char after the colon when a namespace is used) Initially I thought that the edit linked was correct but on second thought I see that it might have been demonstrating behavior when a leading space is used in such a link. If that was the intent then it was unclear and it needs to be corrected. (and I don't really see much value in having such an example. links seldom contain leading spaces intentionally in my limited experience with mediawiki projects and I don't see any reason to encourage such a practice.) If that wasn't the intent and it was just a few typos then the edit should stand. --Jeremyb 00:04, 2 August 2007 (UTC)

I have clarified it. If a colon in a page name is not part of a namespace prefix, a space after it is not so strange, it is normal spelling.--Patrick (talk) 09:31, 2 August 2007 (UTC)
Well it appears to work correctly now. (I can see the this page doesn't exist message and the edit box for a new page for Music: My Life and the URLs for those pages do contain the underscore after the colon. However if I try to go to either of those pages for a real namespace I get redirected to the equivalent with the space stripped.) I just assumed that it was intended to be a namespace. IME a space on either side of a colon is weird regardless of whether it's a namespace but again my experience is quite recent here. Most important is that note you added regarding it being a namespace. Thanks --Jeremyb 16:07, 2 August 2007 (UTC)

some guidlines for transcluded pages[edit]

Dear friends;

Thanks for working that hard on the documentation. I noticed that "portable" code / documentation should

  1. not use examples which would generate interlanguage links at various sister projects
  2. should not use interwiki links which are not valid in the projects where these pages are transcluded

The only general inter wiki prefixes i know are « w: » and « m: » but « w: » has a different significance in each of the language projects of the Wikimedia Foundation projects. Best regards
‫·‏לערי ריינהארט‏·‏T‏·‏m‏:‏Th‏·‏T‏·‏email me‏·‏‬ 06:04, 4 January 2008 (UTC)

Is this a bug?[edit]

from → commons:user:i18n#other_open_issues

  • [[w:en:{{FULLPAGENAME}}|]] does not give [[w:en:{{FULLPAGENAME}}|en:{{FULLPAGENAME}}]] and [[m:{{FULLPAGENAME}}|]] does not give [[m:{{FULLPAGENAME}}|{{FULLPAGENAME}}]]
*[[w:en:{{FULLPAGENAME}}|]] [[w:en:{{FULLPAGENAME}}|en:{{FULLPAGENAME}}]]
*[[m:{{FULLPAGENAME}}|]] [[m:{{FULLPAGENAME}}|{{FULLPAGENAME}}]]

produces

Best regards
‫·‏לערי ריינהארט‏·‏T‏·‏m‏:‏Th‏·‏T‏·‏email me‏·‏‬ 06:04, 4 January 2008 (UTC)

piped trick and anchors containing spaces, underscores and other special characters[edit]

[[m:Help talk:Piped link#some guidlines for transcluded pages|]] · « ¿ [[w:en:surprise (emotion)|surprise]] ? »<br />
[[m:Help talk:Piped link#some_guidlines_for_transcluded_pages|Help talk:Piped link#some guidlines for transcluded pages]]<br />

generates:
[[m:Help talk:Piped link#some guidlines for transcluded pages|]] · « ¿ surprise ? »
Help talk:Piped link#some guidlines for transcluded pages

As you can see there is « ¿ no ? » need to create pipes in order to convert the underscores of an anchor / section name to spaces. This is (still) required for other characters. Best regards
‫·‏לערי ריינהארט‏·‏T‏·‏m‏:‏Th‏·‏T‏·‏email me‏·‏‬ 06:28, 4 January 2008 (UTC)

I do not understand what you are trying to say. You show that the pipe trick does not work for section links, and you show an ordinary piped link with underscores in the link target and spaces in the link label. What has this to do with converting the underscores of an anchor / section name to spaces?--Patrick (talk) 07:27, 4 January 2008 (UTC)
a) After the long wikibreak I was not aware that the "pipe trick" does not work with anchors.
b) MediaWiki is changing / developing; there have been times when the conversion of spaces inside section links / anchors into underscores was not selfevidently done by MediaWiki. In order to have smooth "plainlinks" without ugly underscores in the anchors I used the ::Piped links. Best regards
‫·‏לערי ריינהארט‏·‏Th‏·‏T‏·‏email me‏·‏‬ 16:58, 4 January 2008 (UTC)
Notes: (from m:Help:Section#Section linking)
* ...
* Piping the link won't work at all, unfortunately:
** [[#section|]] -> [[#section|]]
** [[page#section|]] -> [[page#section|]]
** [[namespace:page#section|]] -> [[namespace:page#section|]]

bugzilla:011415[edit]

Please take a look at the « edit » link left of m:help:Piped link#Links to other help pages. If you ckick on « edit » you get

http://meta.wikimedia.org/w/index.php?title=Template:H:f&action=edit&section=1
No such section
"You tried to edit a section that doesn't exist. Since there is no section 1, there's no place to save your edit."‎
"Return to Template:H:f]]"

Is this a bug ( related to inclusions of templates ) ?

<Sasa^Stefanovic> because it's inclusion of template that include other template m:template:H:f,
<Sasa^Stefanovic> see ... there is really no sections there, but there is on included template
<gangleri> Sasa, spacebirdy things that http://bugzilla.wikimedia.org/show_bug.cgi?id=11415 __EDITPARENTSECTION__ is that bug

‎→ bugzilla:011415 · "__EDITPARENTSECTION__"‎

Best regards
‫·‏לערי ריינהארט‏·‏Th‏·‏T‏·‏email me‏·‏‬ 13:23, 4 January 2008 (UTC)

Linking using parser function's var as alternate text[edit]

trying:


{{#vardefine:p_link|alt text}}

[[page| {{#var:p_link}}]] //this gives red link titled off