Module:Title

This is an old revision of this page, as edited by Awesome Aasim (talk | contribs) at 19:41, 22 August 2024 (Created page with '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.title and mw.title.new(args.title) or currentTitle return currentTitle[k] end end return p'). 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 currentTitle = mw.title.getCurrentTitle()

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

return p