Module:Liste déroulante
La documentation pour ce module peut être créée à Module:Liste déroulante/doc
local p = {}
local outils = require('Module:Outils')
-- Génère une liste déroulante
function p.make(frame)
local params = outils.extractArgs(frame)
local title = outils.trim(params[1]) or 'Titre ?'
local hiddenList = mw.html.create('ul')
for index, item in pairs(params) do
if(index ~= 1) then
hiddenList
:tag('li'):wikitext(item):done()
end
end
hiddenList:done()
local res = mw.html.create('div')
res
:addClass('dropdown')
:tag('span'):wikitext(title):done()
:node(hiddenList)
res:allDone()
return res
end
return p