Module:Infobox Class
Module documentation
This documentation is transcluded from Module:Infobox Class/doc. [edit] [history] [purge]
This module does not have any documentation. Please consider adding documentation at Module:Infobox Class/doc. [edit]
Module:Infobox Class requires Module:Infobox.
Module:Infobox Class requires Module:Mainonly.
--------------------------
-- Module for [[Template:Infobox Class]]
------------------------
local p = {}
local infobox = require('Module:Infobox')
local onmain = require('Module:Mainonly').on_main
function p.main(frame)
local args = frame:getParent().args
local ret = infobox.new(args)
ret:defineParams{
{ name = 'name', func = 'name' },
{ name = 'image', func = 'image' },
{ name = 'episode', func = 'has_content' },
}
ret:create()
ret:cleanParams()
ret:defineName('Infobox Class')
ret:addClass('infobox-class')
ret:addRow{
{ tag = 'argh', content = 'name', class='infobox-header', colspan = '20' }
}
:pad(20)
:addRow{
{ tag = 'argd', content = 'image', class = 'infobox-image infobox-full-width-content', colspan = '20' }
}
:pad(20)
:addRow{
{ tag = 'th', content = 'Episode', colspan = '7' },
{ tag = 'argd', content = 'episode', colspan = '13' }
}
return ret:tostring()
end
return p