Module:Sandbox/BrandonXLF/4: Difference between revisions

Content deleted Content added
Allow any custom template
No edit summary
Line 1:
-- Sandbox, do not delete
local config = require('Module:Authority control/config').config
local sc = require('Module:Suppress categories')
local p = {}
 
function p.main(frame)
local args = { statelist = frame:preprocess(frame.args.state }[1])
return list
local template = frame.args.template or 'Template:Authority control'
for _, conf in pairs(config) do
local statement = mw.wikibase.getBestStatements('P' .. conf.property, 'P1855')[1]
if statement then
args[conf[1]] = statement.qualifiers['P' .. conf.property][1].datavalue.value
end
end
return sc.main(frame:expandTemplate{ title = template, args = args })
end