Module:Navbox with collapsible groups: Difference between revisions
m
ce / test?
No edit summary |
m (ce / test?) |
||
Line 29: | Line 29: | ||
-- process args | -- process args | ||
local passthrough = { | local passthrough = { | ||
['name']= | ['name']=true,['navbar']=true,['state']=true,['border']=true, | ||
['bodyclass']= | ['bodyclass']=true,['groupclass']=true,['listclass']=true, | ||
['style']= | ['style']=true,['bodystyle']=true,['basestyle']=true, | ||
['title']= | ['title']=true,['titleclass']=true,['titlestyle']=true, | ||
['above']= | ['above']=true,['aboveclass']=true,['abovestyle']=true, | ||
['below']= | ['below']=true,['belowclass']=true,['belowstyle']=true, | ||
['image']= | ['image']=true,['imageclass']=true,['imagestyle']=true, | ||
['imageleft']= | ['imageleft']=true,['imageleftstyle']=true | ||
} | } | ||
for k,v in pairs(args) do | for k,v in pairs(args) do | ||
Line 52: | Line 52: | ||
or k:match('^sect[0-9][0-9]*$') | or k:match('^sect[0-9][0-9]*$') | ||
or k:match('^section[0-9][0-9]*$') ) then | or k:match('^section[0-9][0-9]*$') ) then | ||
local n = mw.ustring.gsub(k, '^[a-z]*([0-9]*)$', '%1') | local n = mw.ustring.gsub(k, '^[a-z]*([0-9]*)$', '%1') or 1 | ||
if targs['list' .. n] == nil then | if targs['list' .. n] == nil then | ||
local titlestyle = concatstyles( | local titlestyle = concatstyles( |