Jump to content

Template talk:No redirect

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Why?

[edit]

Why is this easier than typing [[:page name|label]]? I'm not seeing where avoiding a redirect comes into it or is being avoided. —Largo Plazo (talk) 16:50, 4 February 2014 (UTC)[reply]

To editor Largoplazo: There is more to it than the link as you have typed it above – [[:page name|label]]. When you click the edit link on the template page, you will see in the code that the full url is used to take the clicker directly to the redirect. There is no stopover at the target page with another link at the top to click. Instead, you can use this template. For example, instead of having to type:
  • [http://wiki.riteme.site/w/index.php?title=The_Silence_of_the_Sea&redirect=no ''The Silence of the Sea'']
you can type:
  • ''{{No redirect|The Silence of the Sea}}''
It gets even better when an alias is used, for example:
  • ''{{-r|The Silence of the Sea}}''
will also get you directly to the redirect page. Joys! – Paine Ellsworth CLIMAX! 05:51, 26 June 2014 (UTC)[reply]

Does this template work?

[edit]

Hello,

I wonder if this template is even working. Calling this templates returns a very standard link in the form [[:{{{1}}}|{{{2}}}]], which is redirected when clicking on it, the opposite of the expected behaviour.

I wonder if getting rid of the #ifexist test in the beginning would solve the matter, after all, if the target doesn't exist, the produced link would be a red link in any case, so there would be little harm done.

For the purpose of testing:

  • {{#ifexist:2015 UK General election | Exists | Doesn't exist }} gets: Exists

Notice that the equivalent template on French Wikipedia, fr:Modèle:Noredirect, although coded slightly differently, works with the expected behaviour.

Can someone with editing privileges have a look into this? Place Clichy (talk) 16:43, 28 June 2015 (UTC)[reply]

Not done: It's working as intended: your first example takes me to the redirect, not the ultimate page; it expands to
<span class="plainlinks">[//wiki.riteme.site/w/index.php?title=2015_UK_General_election&redirect=no 2015 UK General election]</span>
which is what I would expect. --Redrose64 (talk) 17:01, 28 June 2015 (UTC)[reply]

Expensiveness

[edit]

On 14 August Jackmcbarn raised a deletion review regarding this template's TFD, with the concern that the redirect check made the template expensive (I only saw the DRV today). I considered that during the TFD, but it's not the case: the original template had had an #ifexist for years before the TFD. A separate non-expensive version could of course be created separately. SiBr4 (talk) 20:31, 6 September 2016 (UTC)[reply]

Protected edit request on 12 October 2017

[edit]

Please sync the sandbox version, which prevents multi-colon errors. Ahecht (TALK
PAGE
) 19:17, 12 October 2017 (UTC)[reply]

Done — Martin (MSGJ · talk) 21:12, 12 October 2017 (UTC)[reply]
[edit]

I noticed a wee buggette (or Undocumented feature) with this template: the default page title is put in initial case for things that are not redirects. For example

  • Blue redirect: {{-r|heroic}} Heroic (not initial case)
  • Blue article: {{-r|hero}} Hero
  • Red link: {{-r|heroinic}} Heroinic

The optional text parameter always gets preserved verbatim, fortunately:

  • Blue redirect: {{-r|heroic|heroic}} heroic
  • Blue article: {{-r|hero|hero}} hero
  • Red link: {{-r|heroinic|heroinic}} heroinic

This is perhaps not particularly important as this template should rarely be transcluded by articles. But on discussion pages, it would perhaps be better to keep the text verbatim.

I imagine this is caused by the use of the FULLPAGENAME when isRedirect is false?

178.164.139.37 (talk) 11:20, 30 December 2018 (UTC)[reply]

Echoing the above – maybe people have not understood the bug report – I consider the undocumented case change very annoying and improper. If I type "{{-r|lowercase}}" and "{{-r|heroic}}", I get what looks like "lowercase" and "Heroic"! This makes no sense, is undocumented, and will introduce errors. It will cause random improper uppercase words in the middle of sentences, and it is not obvious to the user that it will happen or how to avoid it or fix it. If someone provides a link name in lowercase, please let them use lowercase! As MOS:CAPS says, "Wikipedia avoids unnecessary capitalization." —⁠ ⁠BarrelProof (talk) 05:19, 3 June 2024 (UTC)[reply]

Template-protected edit request on 8 July 2023

[edit]

Can somebody please add class mw-redirect to the link? I have CSS styling that makes redirects green, but links from this template look blue. QuickQuokka [⁠talkcontribs] 02:36, 8 July 2023 (UTC)[reply]

Like this? — Martin (MSGJ · talk) 18:23, 8 July 2023 (UTC)[reply]
@MSGJ: Nope. I think the class has to be in the <a> tag itself, otherwise it's still blue. --QuickQuokka [⁠talkcontribs] 18:32, 8 July 2023 (UTC)[reply]
@MSGJ: USA ← Testing this URL --QuickQuokka [⁠talkcontribs] 18:35, 8 July 2023 (UTC)[reply]
Please update the sandbox when you find the right solution — Martin (MSGJ · talk) 19:58, 8 July 2023 (UTC)[reply]
 Not done: This actually cannot be done. It is a technical limitation. Izno (talk) 20:44, 9 July 2023 (UTC)[reply]