![]() | Template:Redirect template 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. |
This is the talk page for discussing improvements to the Redirect template template. |
|
Archives: 1Auto-archiving period: 30 days ![]() |
![]() | This template does not require a rating on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | |||||||
|
There is some small visual bug with {{R avoided double redirect}} that I couldn't find it's origin. The bug scenario is this, when using {{R avoided double redirect}} after another redirect template on the same line, the redirect template isn't bulleted correctly. Using Arrow 2.5 as an example: This is ok:
{{Redirect category shell|1=
{{R to section}}
{{R avoided double redirect|1=Arrow: Season 2.5}}
}}
While this has the bug.
{{Redirect category shell|1=
{{R to section}}{{R avoided double redirect|1=Arrow: Season 2.5}}
}}
In this module, here is the relevant code that handles the text:
local content = string.format('\n<div class="rcat %s">\n*%sThis is a redirect%s%s.%s%s</div>',
args.class or '',
args.name and getPrettyName(args) or '',
args.from and (' from ' .. args.from) or '',
args.to and (' to ' .. args.to) or '',
args.info and beCompatibleWithBug12974 or '',
args.info or ''
This module uses string.format to create the string. The second "%s" is probably what is causing the issue. {{R avoided double redirect}} is different than the other redirect templates, as it uses a module, Module:R avoided double redirect, to handle the logic, but it still passes the information like the other redirect templates to {{Redirect template}} with:
return frame:expandTemplate({title="Redirect template",
args={from=from,info=info,["main category"]=cat,
name=(embed=="yes" and "From an avoided double redirect" or nil)}})
The arg.name that is passed to this module, comes from the arg.name here. I couldn't find where this module uses |embed=
, so it might be connected to this. --Gonnym (talk) 17:52, 14 December 2019 (UTC)
{{#ifeq:{{FULLPAGENAME}}|Wikipedia:Template messages/Redirect pages|| ... }}
First of all, Wikipedia:Template messages/Redirect pages is now a redirect pointing to Wikipedia:Template index/Redirect pages. So the code doesn't actually do what it's supposed to do. Secondly, that index page is already messy and appears in several maintenance categories. It doesn't seem important to me to have this special condition for that page. I'd suggest removing it. SD0001 (talk) 13:36, 26 February 2020 (UTC)
|doc=
. --Gonnym (talk) 08:06, 27 February 2020 (UTC)
A discussion is taking place to address the redirect Template:R rcat. The discussion will occur at Wikipedia:Redirects for discussion/Log/2021 February 14#Template:R rcat until a consensus is reached, and readers of this page are welcome to contribute to the discussion. 𝟙𝟤𝟯𝟺𝐪𝑤𝒆𝓇𝟷𝟮𝟥𝟜𝓺𝔴𝕖𝖗𝟰 (𝗍𝗮𝘭𝙠) 16:17, 14 February 2021 (UTC)
![]() | This edit request to Module:Redirect template has been answered. Set the |answered= parameter to no to reactivate your request. |
Sync with Module:Redirect template/sandbox. This adds an optional |sortkey=
parameter (which would be useful for rcat templates like {{R country data}} where the sortkey is something that is generally well known. –MJL ‐Talk‐☖ 19:05, 12 December 2021 (UTC)