Documentation for this module may be created at Module:Section needed/doc
-- <nowiki>
local section = {}
local getArgs = require('Dev:Arguments').getArgs
function section._main(image, topic, title)
local text = string.format(
'This section%s%s is empty or needs to be expanded. You can help the %s by [%s expanding it].',
topic and (' about ' .. topic) or '',
title and (' in ' .. title) or '',
mw.site.siteName,
tostring(mw.uri.fullUrl(mw.title.getCurrentTitle().prefixedText, 'action=edit'))
)
return mw.html.create('div')
:attr('id', 'mntExpand')
:addClass('section-needed')
:tag('span')
:addClass('image')
:css('text-align', 'center')
:wikitext(image or '[[File:Impresario-ffvi-ios.png|16px]]')
:done()
:tag('span')
:addClass('text')
:css('left', '-40px')
:css('padding-left', '40px')
:wikitext(text)
:done()
:wikitext('[[Category:Section needed]]')
:wikitext(title and ('[[Category:Section needed (' .. title .. ')]]') or '')
end
function section.main(frame)
local args = getArgs(frame)
return section._main(args.image, args.topic, args.title or args[1])
end
return section
Community content is available under CC-BY-SA unless otherwise noted.