Jump to content

Module:Link list

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Tol (talk | contribs) at 23:32, 10 January 2022 (add class "inline"). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

local p = {}

local hlist = 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'
	out = hlist(params)
	return out
end

return p