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

-- Module:AccessoryTypeList
-- Generates a list of accessory type buttons

local p = {}

function p.list(frame)
	-- Fixed list of accessory types
	local types = {
		'Remote control',
		'Stand',
		'Option card',
		'Media',
		'Cable'
	}
	
	-- Build the output: render each type using Template:Accessory type entry
	local output = {}
	for _, accessoryType in ipairs(types) do
		local templateCall = '{{Accessory type entry|type=' .. accessoryType .. '}}'
		table.insert(output, frame:preprocess(templateCall))
	end
	
	return table.concat(output, '\n')
end

return p
MediaWiki Appliance - Powered by TurnKey Linux