Module:Navbox/sandbox: Difference between revisions

Content deleted Content added
introduce cfg; use markers from cfg instead
introduce string.format, use it to access group(style)_and_num parameters
Line 8:
local getArgs -- lazily initialized
local args
local format = string.format
 
local function striped(wikitext, border)
Line 196 ⟶ 197:
:wikitext(processItem(args.imageleft))
end
 
local group_and_num = format(cfg.arg.group_and_num, listnum)
if args['group' .. listnum] then
local groupstyle_and_num = format(cfg.arg.groupstyle_and_num, listnum)
if args['group' .. listnumgroup_and_num] then
local groupCell = row:tag('th')
 
Line 215 ⟶ 218:
groupCell
:cssText(args.groupstyle)
:cssText(args['group' .. listnum .. 'style'groupstyle_and_num])
:wikitext(args['group' .. listnumgroup_and_num])
end
 
local listCell = row:tag('td')
 
if args['group' .. listnumgroup_and_num] then
listCell
:css('text-align', 'left')