More actions
(starting test for parts infobox helper module) |
(change to pull page from frame as arg maybe) |
||
Line 3: | Line 3: | ||
function p._buildInfobox(frame) | function p._buildInfobox(frame) | ||
frame:getArgument{page = 1} | |||
-- load the full parts list to iterate per given category and family | -- load the full parts list to iterate per given category and family | ||
--json = mw.loadJsonData("Data:Collections/parts") | --json = mw.loadJsonData("Data:Collections/parts") | ||
Line 16: | Line 16: | ||
-- append the cells to the headers and cap off the table wiki text | -- append the cells to the headers and cap off the table wiki text | ||
--local tempTable = header..cells.."|}" | --local tempTable = header..cells.."|}" | ||
return | return page | ||
end | end | ||
return p | return p |
Revision as of 02:18, 17 December 2024
Documentation for this module may be created at Module:Infobox parts/doc
local p = {}
local getArgs = require('Module:Arguments').getArgs
function p._buildInfobox(frame)
frame:getArgument{page = 1}
-- load the full parts list to iterate per given category and family
--json = mw.loadJsonData("Data:Collections/parts")
-- each applicable part's data is appended to the table cells
--for k, v in pairs(json[category][family]) do
-- local partJson = mw.loadJsonData("Data:"..k)
-- local tempCell = p._commonCells(partJson)
-- cells = tempCell..cells
--end
-- append the cells to the headers and cap off the table wiki text
--local tempTable = header..cells.."|}"
return page
end
return p