Module:Sandbox/BrandonXLF/1: Difference between revisions

Content deleted Content added
Reverted to revision 877044953 by BrandonXLF (Reverter)
No edit summary
Line 1:
local p = {}
function p.main (frame)
local fArgs = frame.args -- Frame arguments
local pArgs = frame:getParent().args -- Parent arguments
local tArgs = {}
local pFirst = require('Module:Yesno')(fArgs._pf)
local template = fArgs['_t'] -- Get template name
if template == '' ornot template == nil then return
return require('Module:Error').error({'Error: no template name given.'}) -- Template name is needed
end
for k,v in pairs(fArgs) do
tArgs[k] = v -- Add pArgs to tArgs
end
for k,v in pairs(fArgs) do
if k ~= '_t' then -- Do not count fArgs['_t'] as a parameter
tArgs[k] = v -- Add fArgs to tArgs
end
end