Module:Navbox with collapsible groups: Difference between revisions
testing
(testing) |
(testing) |
||
Line 1: | Line 1: | ||
-- This module implements {{Navbox with collapsible groups}} | -- This module implements {{Navbox with collapsible groups}} | ||
local p = {} | local p = {} | ||
local Navbox = require('Module:Navbox') | |||
local getArgs -- lazily initialized | |||
-- helper functions | -- helper functions | ||
Line 18: | Line 21: | ||
end | end | ||
function p. | function p._navbox(args) | ||
local tracking = '' | local tracking = '' | ||
-- table for args passed to navbox | -- table for args passed to navbox | ||
Line 102: | Line 103: | ||
end | end | ||
function p. | function p.navbox(frame) | ||
if not getArgs then | |||
getArgs = require('Module:Arguments').getArgs | |||
end | |||
local args = getArgs(frame, {wrappers = {'Template:Navbox with collapsible groups'}}) | |||
-- Read the arguments in the order they'll be output in, to make references number in the right order. | |||
local _ | |||
_ = args.title | |||
_ = args.above | |||
for i = 1, 20 do | |||
_ = args["group" .. tostring(i)] | |||
_ = args["list" .. tostring(i)] | |||
end | |||
_ = args.below | |||
return p. | return p._navbox(args) | ||
end | end | ||
return p | return p |