Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Module:Infobox parts

From Kerbal Space Program 2 Wiki
Revision as of 02:20, 17 December 2024 by KiwiShark (talk | contribs) (args change)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Documentation for this module may be created at Module:Infobox parts/doc

local p = {}
local getArgs = require('Module:Arguments').getArgs

function p._buildInfobox(frame)
	local args = getArgs(frame)
	page = args[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
MediaWiki Appliance - Powered by TurnKey Linux