Jump to content

Module:Numbered subpages

Permanently protected module
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Frietjes (talk | contribs) at 15:08, 27 October 2016. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

-- This module implements {{numbered subpages}}.

local getArgs = require('Module:Arguments').getArgs

p = {}

function p.main(frame)
	local args = getArgs(frame)
	local maxk = tonumber(args.max or '50') or 50
	local mink = tonumber(args.min or '1') or 1
	local root = frame:preprocess('{{FULLPAGENAME}}')
	local res = ''
	
	for i=mink,maxk do
		res = res .. frame:preprocess('{{' .. root .. '/' .. i .. '}}')
	end
end

return p