Module:Sandbox/BrandonXLF/4

This is an old revision of this page, as edited by BrandonXLF (talk | contribs) at 05:10, 21 February 2023. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

-- 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 = { state = frame.args.state }
	local template = frame.args.sandbox and 'Template:Authority control/sandbox' 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 = 'Foo', args = args })
end

return p