Jump to content

Module:If in category

Permanently protected module
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by HouseBlaster (talk | contribs) at 00:54, 5 September 2024 (create test). 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 = {}

function p.main(frame)
	local getArgs = require('Module:Arguments').getArgs
	local args = getArgs(frame)
	return p._main(args)
end

function p._main(args)
	local page
	-- create a title object for the target page
	if args[page] then
		page = mw.title.new(page)
	else 
		page = mw.title.getCurrentTitle()
	end
	--local page = (args[page] or )
	--local category = args[1] or error("No category given")
	return page
end

return p