Template talk:No redirect
![]() | Template:No redirect is permanently protected from editing because it is a heavily used or highly visible template. Substantial changes should first be proposed and discussed here on this page. If the proposal is uncontroversial or has been discussed and is supported by consensus, editors may use {{edit template-protected}} to notify an administrator or template editor to make the requested edit. Usually, any contributor may edit the template's documentation to add usage notes or categories.
Any contributor may edit the template's sandbox. Functionality of the template can be checked using test cases. |
mainspace redirects. For more information see the template documentation . |
![]() | The contents of Template:No redirect conditional was merged into Template_talk:No redirect on 1 August 2016 after being nominated for deletion. The former page's history now serves to provide attribution for that content in the latter page, and it must not be deleted as long as the latter page exists. |
Why?
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)
- 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://en.wikipedia.org/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)
Does this template work?
![]() | This edit request has been answered. Set the |answered= parameter to no to reactivate your request. |
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.
{{noredirect|2015 UK General election}}
gets: 2015 UK General election[{{fullurl:2015 UK General election|redirect=no}} 2015 UK General election]
gets: 2015 UK General election (the expected result)
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)
Not done: It's working as intended: your first example takes me to the redirect, not the ultimate page; it expands to
which is what I would expect. --Redrose64 (talk) 17:01, 28 June 2015 (UTC)<span class="plainlinks">[//en.wikipedia.org/w/index.php?title=2015_UK_General_election&redirect=no 2015 UK General election]</span>
Expensiveness
On 14 August
Protected edit request on 12 October 2017
![]() | This edit request has been answered. Set the |answered= parameter to no to reactivate your request. |
Please sync the sandbox version, which prevents multi-colon errors. Ahecht (TALK
PAGE) 19:17, 12 October 2017 (UTC)
Done — Martin (MSGJ · talk) 21:12, 12 October 2017 (UTC)
Link text is initial caps if target is not a redirect
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)
- Echoing the above – maybe people have not understood the bug report – I consider the undocumented case change very annoying and improper. If I type "
{{
MOS:CAPS says, "Wikipedia avoids unnecessary capitalization." — BarrelProof (talk) 05:19, 3 June 2024 (UTC)]
Template-protected edit request on 8 July 2023
![]() | This edit request has been answered. Set the |answered= parameter to no to reactivate your request. |
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 [talk • contribs] 02:36, 8 July 2023 (UTC)
- Like this? — Martin (MSGJ · talk) 18:23, 8 July 2023 (UTC)
- @MSGJ: Nope. I think the class has to be in the
<a>
tag itself, otherwise it's still blue. --QuickQuokka [talk • contribs] 18:32, 8 July 2023 (UTC) - @]
- Please update the sandbox when you find the right solution — Martin (MSGJ · talk) 19:58, 8 July 2023 (UTC)
- @MSGJ: Nope. I think the class has to be in the
Not done: This actually cannot be done. It is a technical limitation. Izno (talk) 20:44, 9 July 2023 (UTC)
Template-protected edit request on 27 June 2025
![]() | This edit request has been answered. Set the |answered= parameter to no to reactivate your request. |
The ifexists
parser function no longer adds backlinks, thus this template should be modified to add these backlinks if using an external URL. See more information at Template talk:R avoided double redirect § Edit request 26 June 2025.
Line 1: | Line 1: |
{{safesubst:<noinclude/>#if: {{safesubst:<noinclude/>#invoke:Redirect|isRedirect|{{{1}}}}} | {{safesubst:<noinclude/>#if: {{safesubst:<noinclude/>#invoke:Redirect|isRedirect|{{{1}}}}} |
| <span class="plainlinks">[{{safesubst:<noinclude/>fullurl:{{{1}}}|redirect=no}} {{{2|{{{1}}}}}}]</span> | | <span class="plainlinks">[{{safesubst:<noinclude/>fullurl:{{{1}}}|redirect=no}} {{{2|{{{1}}}}}}]</span><span style="display: none">[[:{{{1}}}]]</span> |
| {{safesubst:<noinclude/>#if:{{{2|}}}|[[:{{safesubst:<noinclude/>FULLPAGENAME:{{{1}}}}}|{{{2}}}]]|[[:{{safesubst:<noinclude/>FULLPAGENAME:{{{1}}}}}]]}} | | {{safesubst:<noinclude/>#if:{{{2|}}}|[[:{{safesubst:<noinclude/>FULLPAGENAME:{{{1}}}}}|{{{2}}}]]|[[:{{safesubst:<noinclude/>FULLPAGENAME:{{{1}}}}}]]}} |
}}<noinclude> | }}<noinclude> |
~ Eejit43 (talk) 00:10, 27 June 2025 (UTC)
Completed. ]