Jump to content

Module:Title

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Awesome Aasim (talk | contribs) at 19:47, 22 August 2024. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
local p = {}
local currentTitle = mw.title.getCurrentTitle()

for k,_ in pairs(currentTitle) do
	p[k] = function(frame)
		local args = require("Module:Arguments").getArgs(frame)
		local title = (args[1] and mw.title.new(args[1])) or (args.title and mw.title.new(args.title)) or currentTitle
		return args[title[k]] or title[k]
	end
end

return p