Modulo:Tracce: differenze tra le versioni
Contenuto cancellato Contenuto aggiunto
Nessun oggetto della modifica |
traccia iniziale <> 1 |
||
Riga 36:
local edizioni = args["Edizioni" .. i] or ""
if AutoreTestoeMusica ~= "" then
table.insert(row_elements, " <small>(")
table.insert(row_elements, AutoreTestoeMusica )
elseif AutoreTesto ~= "" then
table.insert(row_elements, " <small>(")
if AutoreMusica ~= "" then
table.insert(row_elements, AutoreTesto)
Riga 48:
end
elseif AutoreMusica ~= "" then
table.insert(row_elements, " <small>(")
table.insert(row_elements, AutoreMusica)
else
Riga 55:
if edizioni ~= "" then
if no_autore then
table.insert(row_elements, " <small>(")
else
table.insert(row_elements, ";")
Riga 83:
end
local function componi_tracce(
local tracks = {}
table.insert(tracks, "<ol>")
Riga 107 ⟶ 108:
function p.tracce(frame)
-- ottiene i parametri del template originale
local pframe = frame:getParent()
-- estrae tutti i parametri e li memorizza in una tabella (pframe ritorna una pseudotabella, vedi documentazione)
local args = {}
local primo_titolo = 999
local inizio, fine, numero_titolo
for k, v in pairs( pframe.args ) do
args[k] = v
inizio, fine = string.find(k, "Titolo", 1, true)
end ▼
if fine ~= nil then
numero_titolo = tonumber(string.sub(k, fine+1))
▲ local config = {};
if numero_titolo ~= nil and numero_titolo < primo_titolo then
end
return componi_tracce(config, args)▼
if primo_titolo < 999 then
else
return ""
end
end
|