![]() | 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: | |||||||
|
![]() | This edit request to Module:Redirect template has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Please sync changes from the sandbox: mostly cleanup/simplification of the code.
I've explained the edits in the edit summaries (starting from this edit); some of the supporting statements are here:
|embed=
parameter is not used anywhere with value other than yes
.|category=
parameter is totally unused.The way in which the namespaceCategories table is used hardly looks efficient, though I've not tried to change it; I'll look into it later if time permits. SD0001 (talk) 08:05, 21 December 2018 (UTC)
I’m hoping I pinged you properly in my undos, but if I did not, I’m letting you know that I have undone your recent changes to Module:Redirect template since a change somewhere in the aforementioned module broke the way Template:Redirect template appears when transcluded multiple times on pages in certain circumstances. Please see Template:Redirect template/testcases#Test The Honeycombs (album) for further information. Steel1943 (talk) 21:13, 2 January 2019 (UTC)
<ul><li> ... </li></ul>
containers, so it's not possible that indentation of one would be affected due to the other.**
→ *
in the template code. This, I think, should be done on all rcat templates that use sub-bullets, because it makes semantic sense, as well as facilitates the improvements that I made in the module - which is to replace *
with <ul class="rcat rcat-name"><li>...</li></ul>
, which makes the markup structured, allowing for bots and scripts to identify the rcat templates from the HTML markup of the page. This would be used in improving the functionality within Twinkle to add and remove rcat templates. (I have already implemented this for articles). SD0001 (talk) 04:24, 3 January 2019 (UTC)
**
bullets: If you believe that you have found the fix with the indention of subsequent transclusions of ((Redirect template)) after versions with lines containing asterisks (**
), and the only additional fix necessary is to change **
to *
in the second line ... of all templates that have multiple lines (((R with history)) is obviously only one of many such templates), sounds like a plan. (Pinging Paine Ellsworth in the event they by some chance have a list of Rcat templates with multiple lines that utilize double bullets in the second line, or if they can provide any further input.) Steel1943 (talk) 04:33, 3 January 2019 (UTC)
**
to *
. Can be done easily using a script. By the way, I note that there exist some templates like ((R from misspelling)) and ((R from template shortcut)) which presently use single bullets and hence render incorrectly. SD0001 (talk) 10:20, 3 January 2019 (UTC)|name=
parameter. That has also since been fixed; however, it begs the questions, "Are these changes really necessary?" and if they are, then "Why can't they be implemented in ways that don't break so many rcats in more ways than one?" Paine Ellsworth, ed. put'r there 12:02, 3 January 2019 (UTC)![]() | This edit request to Module:Redirect template has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
With the last few edits in the sandbox, I am certain that I have a bug-free version. Please incorporate. Changes have been extensively tested using the newly-created Template:Redirect template/testcases, armed with this wonderful script that I was recently informed about. SD0001 (talk) 19:53, 4 January 2019 (UTC)
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= or |ans= 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)