The site was updated to MediaWiki 1.43. If anything looks broken or there are glitches, report on the talk page or Discord in #wiki-support.
Module:Tabber
Documentation for this module may be created at Module:Tabber/doc
local p = {}
function getArgCount(args)
i = 0
for inc, val in ipairs(args) do
i = i + 1
end
return i
end
function p.main(frame)
local parentArgs = frame:getParent().args
local content = ""
local namedParameters = false
--Check if the named parameter format is used
if parentArgs["title1"] and parentArgs["content1"] then
namedParameters = true
end
if namedParameters then
-- Handle named arguments
local i = 1
while parentArgs["title" .. i] and parentArgs["content" .. i] do
if i ~= 1 then
content = content .. "|-|"
end
content = content .. parentArgs["title" .. i] .. "=" .. parentArgs["content" .. i]
i = i + 1
end
else
-- Handle positional arguments
for i = 1, getArgCount(parentArgs), 2 do
if i ~= 1 then
content = content .. "|-|"
end
content = content .. parentArgs[i] .. "=" .. parentArgs[i+1]
end
end
return frame:extensionTag('tabber', content)
end
return p