Modul:Arguments
Z Bradavice Online Wiki
More actions
Dokumentaci tohoto modulu lze vytvořit na stránce Modul:Arguments/Dokumentace
-- Module:Arguments (minimal)
local p = {}
function p.getArgs(frame)
local args = {}
-- Přednost mají přímé parametry šablony
for k, v in pairs(frame.args or {}) do
args[k] = v
end
local parent = frame:getParent()
if parent then
for k, v in pairs(parent.args or {}) do
if args[k] == nil then
args[k] = v
end
end
end
return args
end
return p