Difference between revisions of "Module:MonsterBox"
| Line 6: | Line 6: | ||
local table = mw.html.create('table'):addClass('coa-infobox'):addClass('monster') | local table = mw.html.create('table'):addClass('coa-infobox'):addClass('monster') | ||
| − | -- | + | -- Create header |
local td = table:tag('tr'):tag('td') | local td = table:tag('tr'):tag('td') | ||
td:addClass('infobox-header') | td:addClass('infobox-header') | ||
td:attr('colspan', '2') | td:attr('colspan', '2') | ||
| − | td:wikitext( | + | td:wikitext(frame.args.name) |
td:done() | td:done() | ||
Revision as of 11:33, 11 February 2019
Documentation for this module may be created at Module:MonsterBox/doc
local export = {}
local pagename = mw.title.getCurrentTitle().fullText
function export.show(frame)
local table = mw.html.create('table'):addClass('coa-infobox'):addClass('monster')
-- Create header
local td = table:tag('tr'):tag('td')
td:addClass('infobox-header')
td:attr('colspan', '2')
td:wikitext(frame.args.name)
td:done()
return tostring(table)
end
return export