local labelledListHatnote = require('Module:Labelled list hatnote')
local mArguments --initialize lazily
local yesno --initialize lazily
local p = {}
--Implements {{main}} from the frame
function p.main (frame)
mArguments = require('Module:Arguments')
yesno = require('Module:Yesno')
local template = frame:getParent():getTitle()
local args = mArguments.getArgs(frame, {parentOnly = true})
local pages = labelledListHatnote.preprocessDisplays(args)
local options = {
category = yesno(args.category),
extraclasses = frame.args.extraclasses,
ifexists = yesno(frame.args.ifexists),
namespace = frame.args.namespace or args.namespace,
selfref = yesno(frame.args.selfref or args.selfref),
template = template
}
return p._main(pages, options)
end
--Implements {{main}} but takes a manual arguments table
function p._main (pages, options)
local labels = {
'Main article',
'Main articles',
'Main page',
'Main pages'
}
options.icon = "WikimediaUI-Article-ltr.svg"
return labelledListHatnote._labelledList(pages, labels, options)
end
return p