Module:Portal toolbox: Difference between revisions

Content deleted Content added
m simplify
m rename function parameter for clarity
Line 30:
end
 
local function toolbox_section(frame, args, tbl, section_header, prefixarg_prefix, page_prefix, row_function)
if row_function == nil then
row_function = toolbox_row
Line 37:
for k, _ in pairs(args) do
if type(k) == 'string' then
local num = k:match('^' .. prefixarg_prefix .. '(%d+)$')
if num then
table.insert(nums, tonumber(num))
Line 49:
toolbox_header_row(frame, tbl, section_header)
for _, num in ipairs(nums) do
local arg_name = prefixarg_prefix .. num
local a = args[arg_name]
local pagename = page_prefix .. a