"मोड्युल:Location map/multi" का संशोधनहरू बिचको अन्तर

Content deleted Content added
नयाँ पृष्ठ: require('Module:No globals') local p = {} local getArgs = require('Module:Arguments').getArgs local locmap = require('Module:Location map') function p.container(f...
add switcher support
पङ्क्ति ६९:
end
if not map then
map = {}
map = locmap.getMapParams(args[1], frame)
for mapname in string.gmatch(args[1], '[^#]+') do
map[#map + 1] = locmap.getMapParams(args[1]mapname, frame)
end
if #map ~= 1 then
local outputs = {}
args.autoSwitcherLabel = true
for k,v in ipairs(map) do
outputs[k] = p.many(frame, args, v)
end
return '<div class="switcher-container">' .. table.concat(outputs) .. '</div>'
end
map = map[1]
end
local marks = {}
Line १२३ ⟶ १३५:
local dataModule = mw.loadData(frame.args[1])
if not map then
map = {}
map = locmap.getMapParams(dataModule.containerArgs[1], frame)
for mapname in string.gmatch(dataModule.containerArgs[1], '[^#]+') do
map[#map + 1] = locmap.getMapParams(dataModule.containerArgs[1]mapname, frame)
end
if #map ~= 1 then
local outputs = {}
args.autoSwitcherLabel = true
for k,v in ipairs(map) do
outputs[k] = p.load(frame, args, v)
end
return '<div class="switcher-container">' .. table.concat(outputs) .. '</div>'
end
map = map[1]
end
local marks = {}