Jump to content

Module:Link list

From Wikipedia, the free encyclopedia
This is the current revision of this page, as edited by Izno (talk | contribs) at 23:45, 8 March 2022 (remove hlist name, remove global 'out'). The present address (URL) is a permanent link to this version.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

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