Content deleted Content added
Module:Navbox/configuration/sandbox |
test a child navbox feature |
||
Line 235:
-- Assume list text is for a subgroup navbox so no automatic striping for this row.
oddEven = listText:find(cfg.pattern.navbox_title) and cfg.marker.restart or cfg.class.navbox_odd_part
end▼
if listText == cfg.keyword.border_child then
local child_args = {[cfg.arg.border] = cfg.keyword.border_child}
for k, v in pairs(args) do
if (#k > #list_and_num + 1) and (k:sub(1,#list_and_num+1) == (list_and_num .. '_')) then
child_args[k:sub(#list_and_num+2)] = v
end
end
if (#child_args) > 1 then
read_args(child_args)
listText = p._navbox(child_args)
end
end
Line 469 ⟶ 482:
return templatestyles_markers
end
local function read_args(args)
-- Read the arguments in the order they'll be output in, to make references▼
-- number in the right order.▼
local _▼
_ = args[cfg.arg.title]▼
_ = args[cfg.arg.above]▼
-- Limit this to 20 as covering 'most' cases (that's a SWAG) and because▼
-- iterator approach won't work here▼
for i = 1, 20 do▼
_ = args[format(cfg.arg.group_and_num, i)]▼
_ = args[format(cfg.arg.list_and_num, i)]▼
end
_ = args[cfg.arg.below]▼
end
function p._navbox(navboxArgs)
Line 554 ⟶ 583:
args = getArgs(frame, {wrappers = {cfg.pattern.navbox}})
read_args(args)
▲ -- Read the arguments in the order they'll be output in, to make references
▲ -- number in the right order.
▲ local _
▲ _ = args[cfg.arg.title]
▲ _ = args[cfg.arg.above]
▲ -- Limit this to 20 as covering 'most' cases (that's a SWAG) and because
▲ -- iterator approach won't work here
▲ for i = 1, 20 do
▲ _ = args[format(cfg.arg.group_and_num, i)]
▲ _ = args[format(cfg.arg.list_and_num, i)]
▲ end
▲ _ = args[cfg.arg.below]
return p._navbox(args)
|