« Module:Infobox/Core » : différence entre les versions
De Nefald
Autres actions
m Preprocess |
m Parserfunctions |
||
| Ligne 118 : | Ligne 118 : | ||
local iconeNom = config.icone.nom | local iconeNom = config.icone.nom | ||
-- Utiliser | -- Utiliser mw.getCurrentFrame() si frame n'est pas disponible | ||
local | local currentFrame = frame or mw.getCurrentFrame() | ||
local iconeContent = '{{#' .. iconeType .. ':' .. iconeNom .. '}}' | |||
iconeDiv: | if currentFrame then | ||
iconeContent = currentFrame:preprocess(iconeContent) | |||
end | |||
iconeDiv:wikitext(iconeContent) | |||
root:node(iconeDiv) | root:node(iconeDiv) | ||
end | end | ||
return tostring(root) | return tostring(root) | ||