Module talk:WikiProject banner/Archive 16: Difference between revisions

Content deleted Content added
m Archiving 1 discussion(s) from Module talk:WikiProject banner) (bot
m Archiving 1 discussion(s) from Module talk:WikiProject banner) (bot
Line 17:
 
:Easiest way to fix that is by editing the banner template [https://en.wikipedia.org/w/index.php?title=Template:WikiProject_Redirect&diff=prev&oldid=1263837498] &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 23:01, 18 December 2024 (UTC)
 
== Better redirect template handling ==
 
At [[Module:WikiProject_banner#L-283]], the banner name should not be the value of <syntaxhighlight lang="Lua" inline>local banner_name = mw.title.new(args.BANNER_NAME or 'Template:WikiProject ' .. (args.PROJECT or 'PROJECT'))</syntaxhighlight>, but it should instead be the value of <syntaxhighlight lang="Lua" inline>mw.getCurrentFrame():getParent():getTitle()</syntaxhighlight>, as this will allow any redirect usages to be validated as well, and not only those templates titled "WikiProject {{var|something}}". [[User:Gonnym|Gonnym]] ([[User talk:Gonnym|talk]]) 12:09, 4 January 2025 (UTC)