Module:Sponsors

From TwogPedia
Revision as of 21:34, 23 September 2022 by Couchor (talk | contribs)

Documentation for this module may be created at Module:Sponsors/doc

local getArgs = require('Module:Arguments').getArgs

local Sponsors = {}

local VariablesLua = mw.ext.VariablesLua

function Sponsors.main(frame)
	local args = getArgs(frame)
	local sponsorList = ''
	for key, value in ipairs (args) do
		local values = mw.text.jsonDecode(value)
		for key2, value2 in pairs ( values ) do
			mw.log(key2)
			if key2 == 'id' then
				-- if result.startRef then
		  --      	local startRefName = result.startRefName or ''
		  --      	li:wikitext(frame:preprocess('<ref name='.. startRefName .. '>' ..result.startRef .. '</ref>'))
		  --      end
				sponsorList = sponsorList .. value2 .. ','	
			end
		end
	end
	return sponsorList
end

return Sponsors