Module:Sandbox/BrandonXLF/1: Difference between revisions

Content deleted Content added
Restored revision 883984777 by BrandonXLF (Restorer)
This should work
Line 1:
function p.main (frameargs1, args2, switch)
local p = {}
local template = args2['_']
function p.main (frame)
args2._ = nil
local fA = frame.args
if pFswitch then
local pA = frame:getParent().args
args1, args2 = args2, args1
local tA = {}
end
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
for k,v in pairs(pAargs1) do
if pF then
fA, pAargs2[k] = pA, fAv
end
return frame:expandTemplate{title = template, args = tAargs2}
for k,v in pairs(pA) do
end
tA[k] = v
 
end
function gen (switch)
for k,v in pairs(fA) do
return function (frame)
tA[k] = v
return main(frame:getParent().args, frame.args, switch)
end
return frame:expandTemplate{title = template, args = tA}
end
 
return p{
default = gen(false),
force = gen(true)
}