The categorization as Category: Extensions without MediaWiki version should be omitted if the templatemode
parameter is nocats
. Currently it’s always categorized if no version requirement can be determined, for instance seen in Extension status. I don’t feel confident enough to perform the edits myself so I’m posting this on the discussion page. Kai Burghardt (talk) 19:19, 9 February 2022 (UTC)
Topic on Module talk:Extension/Flow
Appearance
Done!
Would it be good to add the nocats check to the cat()
function? e.g.:
local function cat( title )
local pargs = frame:getParent().args
if pargs.templatemode == "nocats" then
return ''
end
return '[[Category:' .. title .. ']]'
end
Good suggestion, yet I think cat
should really just emit a categorization string, to keep its behavior predictable.
You may introduce a separate function, say ccat
(conditional category), that checks for pargs.templatemode
and relies on cat
, because there might be a legit situation for categorization regardless of nocats
By the way, currently, there are two occurrences of the string literal '[[Category:'
.
I guess this should be deduplicated.
‑‑Kai Burghardt (talk) 00:50, 10 February 2022 (UTC)