Module:PartTypeList

Revision as of 01:00, 14 February 2026 by Arclight (talk | contribs) (Arclight changed the content model of the page Module:PartTypeList from "wikitext" to "Scribunto module")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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

-- Module:PartTypeList
-- Generates a list of part type buttons

local p = {}

function p.list(frame)
	-- Fixed list of part types
	local types = {
		'CRT tube',
		'IC',
		'Flyback transformer',
		'Board',
		'Yoke',
		'Other'
	}
	
	-- Build the output: render each type using Template:Part type entry
	local output = {}
	for _, partType in ipairs(types) do
		local templateCall = '{{Part type entry|type=' .. partType .. '}}'
		table.insert(output, frame:preprocess(templateCall))
	end
	
	return table.concat(output, '\n')
end

return p
MediaWiki Appliance - Powered by TurnKey Linux