Модуль:GetField: различия между версиями

Нет описания правки
Нет описания правки
Строка 1402: Строка 1402:
return frame:preprocess(table.concat(out, " "))
return frame:preprocess(table.concat(out, " "))
end
end
end
function p.flattenFieldSelectiveDirect(id, dataPage, paramNames)
if id == "" or dataPage == "" or type(paramNames) ~= "table" or #paramNames == 0 then
return ""
end
local moduleName = JsonPaths.get(dataPage)
local data = load_cached_data(moduleName)
if not data then
return ""
end
local entry = resolve_entry(data, id) or {}
local parts = flatten_selected_parts(entry, paramNames)
if #parts == 0 then
return ""
end
return table.concat(parts, "|")
end
end


return p
return p