Module:Infobox: Difference between revisions
Appearance
simplify (tested in sandbox) |
Allow arguments passed via #invoke to override those passed into the invoking template. |
||
Line 400: | Line 400: | ||
function p.infobox(frame) | function p.infobox(frame) | ||
-- | -- Allow arguments passed via #invoke to override those passed into the invoking template. | ||
if frame == mw.getCurrentFrame() then | if frame == mw.getCurrentFrame() then | ||
origArgs = frame:getParent().args | origArgs = frame:getParent().args | ||
end | end | ||
for k,v in pairs(frame.args) do origArgs[k] = mw.text.trim(v) end | |||
-- Parse the data parameters in the same order that the old {{infobox}} did, so that | -- Parse the data parameters in the same order that the old {{infobox}} did, so that |