Module:ImageGallery: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 21: Line 21:
table.concat(fields, ','), query)
table.concat(fields, ','), query)
local build = '==' .. header .. '==\n<gallery heights="180px">\n'
local root = mw.html.create()
root:wikitext('==' .. header .. '==')
local gallery = mw.html.create('gallery')
for _, img in ipairs(images) do
for _, img in ipairs(images) do
build = build .. img.file .. '|' .. img.caption .. '\n'
gallery:wikitext(img.file .. '|' .. img.caption)
end
end
return build .. '</gallery>\n'
root:node(gallery)
return root
end
end


return p
return p

Navigation menu