Модуль:Песочница/Pok: различия между версиями

Нет описания правки
Нет описания правки
Строка 183: Строка 183:
end
end
local param = sw
local param = sw
table.insert(switchKeyToTemplates[sw][key], "{{" .. tplPath .. "|" .. param .. "|" .. key .. "}}")
local extra = ""
local ok, dp = pcall(require, "Module:Песочница/Pok/2")
if ok and dp and dp.flattenComponent then
extra = dp.flattenComponent({ args = { id, tplPath } })
end
local tplStr = "{{" .. tplPath .. "|" .. param .. "|" .. key
if extra and extra ~= "" then
tplStr = tplStr .. "|" .. extra
end
tplStr = tplStr .. "}}"
table.insert(switchKeyToTemplates[sw][key], tplStr)
end
end
end
end