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:20, 10 January 2022 (create). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

local p = {}

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

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

return p