To help centralize discussions and keep related topics together, the talk pages of all templates directly invoking Module:Template link general redirect here.
This template does not require a rating on Wikipedia's content assessment scale. It is of interest to the following WikiProjects:
This template (like all templates) is within the scope of WikiProject Templates, a group dedicated to improving the maintenance of Wikipedia's templates. This particular template is especially important to the project because it is used in the maintenance of other templates. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.TemplatesWikipedia:WikiProject TemplatesTemplate:WikiProject TemplatesTemplates
This page has archives.Topics inactive for 365 days are automatically archived 2 or more at a time by Lowercase sigmabot IIIif there are more than 4.
A better way to handle named parameters?
Had a thought about directly supporting named parameters instead of requiring the workaround of named{{=}}. What would it look like if we supported parameters a=named1, b=named2, c=named3... z=named26 that would display as {{templatename|named1=|unnamed1|unamed2|named4=|unamed3}} where the named parameters have an explicit place in the order of the parameters and the unnamed parameters fill in any holes. You could even contrast upper and lower case for named parameter explanations, so {{tlp|templatename|a=named1|A=explanation1}} would show up as {{templatename|named1=explanation1}}. Any thoughts or concerns? VanIsaac, GHTVcontWpWS 18:35, 6 December 2023 (UTC)
I am unable to parse your examples above. There are many typos. Can you please proofread and correct your examples? – Jonesey95 (talk) 16:37, 7 December 2023 (UTC)
Same; I don't really understand what's being proposed. Primefac (talk) 19:22, 7 December 2023 (UTC)
From what I can tell, the desire is to be able to do {{tlx|templatename|a=weasel=yes|b=snorkel=|c=3=23%}} to get display that looks like {{templatename|weasel=yes|snorkel=|3=23%}}. But this is kind of pointless when you can already do:
{{tlx|templatename|2=weasel=yes|3=snorkel=|4=3=23%}} for {{templatename|weasel=yes|snorkel=|3=23%}}.
{{tlx|templatename|weasel{{=}}yes|snorkel{{=}}|3{{=}}23%}} for identical {{templatename|weasel=yes|snorkel=|3=23%}} output
{{tlx|templatename|<nowiki>weasel=yes|snorkel=|3=23%</nowiki>}} for the same result {{templatename|weasel=yes|snorkel=|3=23%}}
@Vanisaac: My two cents: It is not pointless (it would actually be very useful: it would spare the annoying thing of writing {{=}}, or having to replace all the equals signs when we copy and paste a template call from real code, or having to write the parameter numbers by hand). However it is impossible. Or better, it is possible, but we cannot preserve the parameter order. The best we could do would be a template in which you type {{tlx|templatename|a=one|b=two|c=three}} and you get maybe {{templatename|b=two|c=three|a=one}} the first time you visit the page and maybe (who knows?) {{templatename|c=three|a=one|b=two}} the next time you refresh the page. Or we can force everything to an alphabetical order like I do at {{User:Grufo/Debug}} (for other purposes), but that would not make sense either. Unless things have changed, there is no way to reconstruct the order of named parameters from within a called template/module. --Grufo (talk) 01:01, 21 December 2025 (UTC)
P.S. Sorry for resurrecting an old post. While scrolling I thought this question was written fifteen days ago, but it was actually written two years and fifteen days ago. I hope my answer will still be useful. --Grufo (talk) 01:03, 21 December 2025 (UTC)
Suppress categorization with _show_result=yes
I've stumbled upon an issue on Template:Wrapper/doc. Template:Wrapper is being unintentionally categorized into Category:Wrapper templates by the demos presented in the documentation via {{tlg|...|_show_result=yes}} (added in Special:Diff/1283378575). We can't just add |nocat{{=}}true to the template {{tlg}}, because it will show up in the sample wikitext, which needs to be easily copy-pasteable for the users of the template.
Adding an underscore similarly to other parameters (like _show_result) may or may not be a good idea: if _ne(args._nocat) then codeArguments['nocat'] = true end. Unfortunately, I don't have time to look into it further this week. —andrybak (talk) 20:12, 22 November 2025 (UTC)
An underscore would be fine, I just want to avoid triggering an error on templates that use Module:Check for unknown parameters and don't have a |nocat= parameter. --Ahecht (TALK PAGE) 16:38, 25 November 2025 (UTC)
I've implemented the above proposal, but I'm not sure how useful it is for this particular template: {{wrapper}} calls {{category handler}} which has its own |nocat=, which I think is why it's showing up in the wrapper templates category. Primefac (talk) 11:14, 12 February 2026 (UTC)
A minor issue in the documentation can be visible in Template:Template link code. In the rows "all braces in link" and "inside braces in link" with |brace=on or |braceinside=on respectively, the braces simply don't show up. This is caused by the fact that the arguments of Module:Template link generalargs.brace and args.braceinside are checked in two places: function linkTitle and function _main which "cancel each other out", but the first one is not reached if |nolink=yes is passed into the module – function linkTitle returns early.
I've attempted a fix which just removes the early return. You can see a demo of it at Template:Template link code/sandbox and Template:Template link general/sandbox. Of course, because {{tlc}} passes |nolink=yes to the module, it doesn't make sense to pass any link-affecting parameters to the template, such as brace and braceinside. Perhaps Template:Template link general/doc should be tweaked to be able hide the rows of the table with such parameters? What do you think? —andrybak (talk) 16:07, 4 May 2025 (UTC)
Found another related bug. As can be seen at the top of Template:Template link code/testcases in the test case labeled "no parameters", the early return in function linkTitle doesn't handle the use case of no first positional parameter, which is falsely advertised in the documentation as With no arguments, it emits the current page name without braces. This row in the table in the documentation doesn't show a live demo in the second column, but just shows the template's name (skipping {{tlc}}'s styling in tag <code> in the process):
| {{tji|{{{1|tlg}}}}} | {{{1|tlg}}} | With no arguments, it emits the current page name without braces.
Re: I've attempted a fix which just removes the early return. – I took another look at how the function linkTitle uses the variable titlePart and realized that it the logic could be streamlined further. The full new better fix is: Special:Diff/1288738796/1288996246 – move all code related to the variable titlePart to the bottom of the function. With this change, the function now consists of three separate parts: calculation of titleObj, of textPart, and of titlePart.
Re: args.brace and args.braceinside are checked in two places [...] but the first one is not reached if |nolink=yes is passed into the module – there's a similar issue with args.alttext, which is handled after the aforementioned early return. The bug can be seen in the test case titled {{...|x0|alttext=x0 link}}.
Half a year later, I took another look at the how function linkTitle is used and realized that the Lua code could be cleaned up a bit more. The new fix for this section: Special:Diff/1265037681/1323585100. All previous links to suggested changes above were struck. —andrybak (talk) 17:17, 22 November 2025 (UTC)
Should be sorted, with apologies for how stupidly long it took for me to get over here and take a good look. Primefac (talk) 11:20, 12 February 2026 (UTC)
Thank you! Don't worry about the delay, this feature is not that popular. Outside of the documentation, it's probably not used at all with the templates which were affected. —andrybak (talk) 18:25, 13 February 2026 (UTC)
Working, then not...
Any elses {{Tlx}} buggy by showing links only in Previews, then on page hard refresh (delete page cache and refresh) after saving a page or just viewing some template doc, it is showing as {{Tlc}} equivalent (i.e. no hyperlink)? New issue for me, will keep monitoring as there has been no recent changes to the templates, may then report at Village Pump then Phab. waddie96 ★ (talk) 13:49, 30 August 2025 (UTC)
If you make a report at VPT and you want help from other editors, please ensure that it is coherent. I do not understand what you are saying in the above post. – Jonesey95 (talk) 15:16, 31 August 2025 (UTC)
The edit notice at WP:VPT may help you to construct a problem report that people will understand. It's the box at the top when you edit, which begins with "Welcome to the village pump for technical issues." Those instructions are useful when reporting a problem anywhere, not just at VPT. – Jonesey95 (talk) 18:38, 31 August 2025 (UTC)
Yes it appears you got this template talk and VPT mixed up. It's okay 😘😘 waddie96 ★ (talk) 19:15, 31 August 2025 (UTC)
@Waddie96: Jonesey95 didn't get this template talk and VPT mixed up. Their two mentions of VPT were because in your first post here, you stated may then report at Village Pump then Phab. --Redrose64🌹 (talk) 21:01, 31 August 2025 (UTC)
@Redrose64 And so? What seems to be the serious issue?? waddie96 ★ (talk) 21:13, 31 August 2025 (UTC)
To quote Jonesey95: please ensure that it is coherent. I do not understand what you are saying in the above post. I would agree: what exactly does Any elses {{Tlx}} buggy by showing links only in Previews, then on page hard refresh (delete page cache and refresh) after saving a page or just viewing some template doc, it is showing as {{Tlc}} equivalent (i.e. no hyperlink)? mean? It make little sense to me either. --Redrose64🌹 (talk) 22:41, 31 August 2025 (UTC)
It seems fairly straight-forward to me... when Previewing the page, {{tlx}} usage shows up as it should, but when seen after a Purge it shows as {{tlc}}. Some examples would be nice, though it might be client-side so I'm not sure how reproducible it will be. That being said, if you're viewing a template, then of course the documentation will not show as a link because wikilinks show up as text when on the page it's linked (e.g. Template talk:Template link general). Primefac (talk) 16:31, 1 September 2025 (UTC)
Thanks Primefac. I tried in incognito and it persisted. But today working fine. I thought it had possibly something to do with Parsoid as UNIQ strip markers were being displayed late last night, however it’s resolved. Next time I’ll take it straight to phab. As en wiki does every now and then, furious typers behind keyboards chase one away a bit. Passive aggression on-wiki should count as incivility 🙈 waddie96 ★ (talk) 16:39, 1 September 2025 (UTC)
For what it's worth making a post at the affected template's talk page is usually a good first place to post rather than jumping straight to phab (or even VPT), since a recent change in a template can easily throw things off for certain editors but not others. Goodness knows I've seen enough of them over the years, and even a good few in the last month or so, where a simple revert fixes most of the issues. Primefac (talk) 18:03, 1 September 2025 (UTC)
Thanks yeh, my earlier comment was exaggerated to highlight the likely consequence of the approach @Jonesey95 took in responding to a fellow editor. Interactions framed in a brusque or dismissive manner can discourage editors from raising issues in the future. A collaborative and civil tone goes a long way to solve an issue, without unnecessary escalation. Editor retention is directly impacted by behaviour like this. waddie96 ★ (talk) 21:24, 1 September 2025 (UTC)
But I appreciate your feedback. Thanks for consistently being good to interact with the 10+ years I've been active @Primefacwaddie96 ★ (talk) 21:26, 1 September 2025 (UTC)
Rude is as rude does. As always, I was trying to help. Insulting me yet again makes me less willing to help you in the future. – Jonesey95 (talk) 21:47, 1 September 2025 (UTC)
A collaborative and civil tone goes a long way to solve an issue It helps to have the issues explained clearly right at the start. I still don't understand what Any elses {{Tlx}} buggy is intended to mean. --Redrose64🌹 (talk) 07:53, 2 September 2025 (UTC)
Then you should probably have written something like "Does anybody else see a problem with X? When I do Y, I see Z. The clearer that your description is, the more likely it is that others will attempt to replicate the problem, and reply with their experiences. --Redrose64🌹 (talk) 23:01, 2 September 2025 (UTC)
@Waddie96, is it possible that the issue you're describing is caused by 1Password, like in sbb's section (currently just below this one)? The symptoms sound somewhat similar. —andrybak (talk) 21:31, 22 December 2025 (UTC)
I can't see tlx templates rendered on save
Resolved
This is really weird. I was looking at the list of {{HTML lists}}, and none of the templates in that table were renedered as links, just code-style {{hlist|item1|item2}}, etc., without linking to {{hlist}}. I was going to edit {{tlx}} into each of the tables so they were linkable, but the table's source already was using {{tlx}}.
Confused, I went to the {{Template-linking templates}} "main table" for the {{tlg}} templates, and under the linked column, {{tl2}}, {{tlx}}, {{Template:tlxu}}, {{tlxi}}, {{tlxb}}, and {{subst:tlxs}} all appear exactly like I have them here (I listed them all with {{tnull}}, because that's how it looks like they've been formatted). However, the code in the table uses all the correct templates (not simply {{tnull}} everything).
If I edit {{HTML lists}} or {{Template-linking templates}} and make a trivial change (like adding a space character), when I preview changes, I see everything rendered correctly. But after saving the page, all the {{tlx}}-style templates are rendered like {{tnull}}. Am I doing something wrong? I don't think I have any special user modules/js installed that would cause this. —sbb(talk) 04:13, 19 December 2025 (UTC)
The HTML rendered for the first list ({{hlist}}) at {{HTML lists}} is:
so, definitely no links in the generated code. —sbb(talk) 04:21, 19 December 2025 (UTC)
Log out, try a different web browser, try safemode, do the usual troubleshooting stuff. What happens? They look fine to me. When I View source on that page, I see this HTML: <code>{{<ahref="/wiki/Template:Hlist"title="Template:Hlist">hlist</a>|item1 |item2 }}</code> – Jonesey95 (talk) 19:48, 20 December 2025 (UTC)
I was about to roll my eyes and say "yeah yeah, IT Crowd, turn it off and on again. I know what I'm doing..." ... but after disabling my extensions and turning them on 1-by-1, I can't believe it. My 1Password Extension for Safari is breaking those links. Seems like every link generated by the {{tlx}}-style code-formatted template link templates are being "stripped" or sanitized or something. Color me flabbergasted.
I filed a community/bug report at 1Password. I hope it's just their Javascript and/or CSS colliding with the generated <span>'s classes, something simple like that.
Thanks for your suggestion. I've been so used to pretty bug-free operation of my few browser extensions, I forgot what it was like when they go haywire! —sbb(talk) 18:05, 22 December 2025 (UTC)