Module:also/wrap

local p = {}

function p.main(frame) -- Aggregate the page arguments and pre-set template arguments into one arguments table. t = {} for i, v in ipairs (frame:getParent.args) do		table.insert(t, v)	end for i, v in ipairs (frame.args) do		table.insert(t, v)	end -- Create a new frame with the aggregate arguments. local new_frame = frame:newChild{title = frame:getTitle, args = t} -- Set the new frame as its own parent. This ensures that the aggregated arguments are processed when Module:also processes the parent arguments of the input frame. function new_frame:getParent return self end -- Call standard module. return require('Module:also').main(new_frame) end

return p