This module can be used on a template to keep track of pages using that template with unknown parameters.
Usage
{{#invoke:params|main|first allowed parameter|second allowed parameter|...}}
Each of the values passed to this module is considered an allowed parameter. If a usage of the template includes any parameters not passed to the module, the page will be categorized under Category:Memory Alpha pages using unlisted template parameters.
Module source
require('strict')
local p = {}
function p.main(frame)
local whitelist = frame.args
local used = frame:getParent().args
for key, _ in pairs(used) do
local paramIsWhitelisted = false
for _, value in pairs(whitelist) do
if tostring(key) == value then
paramIsWhitelisted = true
end
end
if not paramIsWhitelisted then
return '[[Category:Memory Alpha pages using unlisted template parameters]]'
end
end
return ''
end
return p