Module:Portal toolbox: Difference between revisions

Content deleted Content added
m prefer user supplied text to 'subpageText'
reduce amount of duplication needed
Line 22:
end
 
local function toolbox_section(frame, args, tbl, rootTitle, title, prefix, page_prefix)
toolbox_header_row(frame, tbl, title)
local nums = {}
Line 37:
local arg_name = prefix .. num
local a = args[arg_name]
local tpagename = mwpage_prefix .title.new(a, 'Portal')a
local text = args[arg_name .. 'text']
local right = args[arg_name .. 'right']
if not text and== t:isSubpageOf(rootTitle)nil then
text = t.subpageTexta
end
if right == nil then
right = edit(frame, apagename)
end
toolbox_row(frame, tbl, apagename, text, right)
end
end
Line 60:
toolbox_row(frame, tbl, rootTitle.fullText, nil, edit(frame, rootTitle.fullText))
toolbox_section(frame, args, tbl, rootTitle, 'Static subpages', 'static', rootTitle.fullText .. '/')
toolbox_section(frame, args, tbl, rootTitle, 'Dynamic subpages', 'dynamic', rootTitle.fullText .. '/')
toolbox_section(frame, args, tbl, rootTitle, 'Other', 'other', '')
return tbl
end