More actions
Documentation for this module may be created at Module:Infobox parts/doc
local p = {}
local getArgs = require('Module:Arguments').getArgs
function p._buildInfobox(args)
--local args = getArgs(frame)
page = args[1]
-- load the full parts list to iterate per module
json = mw.loadJsonData("Data:"..page)
boxes = ""
-- each applicable part's data is appended to the table cells
for k, v in pairs(json["modules"]) do
if k == "engine" then
boxes = boxes.."{{Infobox engines/doc}}"
end
end
mw.logObject(boxes)
return page
end
return p