« Module:Message box » : différence entre les versions

Aucun résumé des modifications
Aucun résumé des modifications
Ligne 2 : Ligne 2 :


local MessageBox = {}
local MessageBox = {}
function MessageBox:export()
    local root = mw.html.create()
    local article = root:tag('article')
    article:wikitext('[[' .. self.image .. ']]')
    article:tag('h4'):wikitext(self.title)
    article:tag('p'):wikitext(self.content)
end


-- Define class
-- Define class
Ligne 9 : Ligne 18 :
     self.image = image
     self.image = image
     self.content = content
     self.content = content
end
function MessageBox:export()
    local root = mw.html.create()


     local article = root:tag('article')
     self.export()
    article:wikitext('[[' .. self.image .. ']]')
    article:tag('h4'):wikitext(self.title)
    article:tag('p'):wikitext(self.content)
end
end


return MessageBox
return MessageBox