Jump to content

Module:Link list

From Wikipedia, the free encyclopedia

local p = {}

local list = require('Module:List').horizontal

function p.main()
	local params = {}
	local parent = mw.getCurrentFrame():getParent().args['parent']
	for num, subpage in ipairs(mw.getCurrentFrame():getParent().args) do
		table.insert(
			params,
			'[[' .. parent .. '/' .. subpage .. '|' .. num .. ']]'
		)
	end
	params['class'] = 'inline'
	
	return list(params)
end

return p