Toggle menu
Toggle preferences menu
Toggle personal menu
Nejste přihlášen(a)
Your IP address will be publicly visible if you make any edits.

Modul:Arguments

Z Bradavice Online Wiki

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