Autres langues
Autres actions
Page créée avec « local p = {} function wikilink(name) if name:sub(1,2) == '' and name:sub(-2) == '' then name = name:sub(3,-3) end return '' .. name .. '' end function p.main(frame) local args = frame:getParent().args local blockquote = mw.html.create():tag('blockquote') local String = '' local counter = 1 for k,v in pairs(args) do if k == 1 then String = String .. wikilink(v) else counter = counter+1 String = String .. ', ' .. wikilink(v)... » |
Aucun résumé des modifications |
||
| Ligne 23 : | Ligne 23 : | ||
end | end | ||
if counter>1 then | if counter>1 then | ||
blockquote:wikitext("'' | blockquote:wikitext("''Voir les articles principaux : " .. String .. "''") | ||
else | else | ||
blockquote:wikitext("'' | blockquote:wikitext("''Voir l'article principal : " .. String .. "''") | ||
end | end | ||
return tostring(blockquote) | return tostring(blockquote) | ||
end | end | ||
return p | return p | ||
Dernière version du 18 novembre 2025 à 13:25
local p = {}
function wikilink(name)
if name:sub(1,2) == '[[' and name:sub(-2) == ']]' then
name = name:sub(3,-3)
end
return '[[' .. name .. ']]'
end
function p.main(frame)
local args = frame:getParent().args
local blockquote = mw.html.create():tag('blockquote')
local String = ''
local counter = 1
for k,v in pairs(args) do
if k == 1 then
String = String .. wikilink(v)
else
counter = counter+1
String = String .. ', ' .. wikilink(v)
end
end
if counter>1 then
blockquote:wikitext("''Voir les articles principaux : " .. String .. "''")
else
blockquote:wikitext("''Voir l'article principal : " .. String .. "''")
end
return tostring(blockquote)
end
return p