Module:Sandbox/BrandonXLF/1

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

local p = {}
function p.main (frame)
	local fA  = frame.args
	local pA  = frame:getParent().args
	local tA = {}
	local template, pF = fA['_t'], require('Module:Yesno')(fA._pf)
	fA._t, fA._pf = nil, nil
	if not template then
		return require('Module:Error').error({'Error: no template name given.'})
	end
	if pF then
		fA, pA = pA, fA
	end
	for k,v in pairs(fA) do
		pA[k] = v
	end
	return frame:expandTemplate{title = template, args = pA}
end
return p