Module:Sandbox/BrandonXLF/1

This is an old revision of this page, as edited by BrandonXLF (talk | contribs) at 20:30, 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 fArgs = frame.args
	local pArgs = frame:getParent().args
	local template = fArgs._t
	local pFirst = require('Module:Yesno')(fArgs._pf)
	if not template then
		return require('Module:Error').error({'No template name given'})
	end
	if pFirst then
		fArgs, pArgs = pArgs, fArgs
	end
	for k,v in pairs(fArgs) do
		pArgs[k] = v
	end
	return frame:expandTemplate{title = template, args = pArgs}
end
return p