Module:Sandbox/BrandonXLF/1

This is an old revision of this page, as edited by BrandonXLF (talk | contribs) at 20:24, 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._template
	if not template then
			return require('Module:Error').error({'No template name given'})
	end
	local pFirst = fArgs._parent_first and true
	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