Modulo:MultiBand: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
Nuova pagina: -- modulo per gestire l'omonimo template -- la gestione dei parametri con numeri progressivi prende spunto da Modulo:Tracce local args = {} local maxInterval = 0 loca...
 
mNessun oggetto della modifica
Riga 17:
return result
end
 
local p = {}
 
function p.get(frame)
local pframe = frame:getParent()
for k, v in pairs( pframe.args ) do
-- mappo gli argomenti del template
if v ~=nil then args[k] = v end
-- cerco l'intervallo più recente in base al numero più alto fra "nomeN", "voceN" e "immN"
num = string.match(k, "(?:nome|voce|imm)(%d+)$")
if num then
if tonumber(num) > maxInterval then
maxInterval = num
end
end
end
end
local year = args["anno"]
if year == nil then year = getValue("anno", maxInterval) end