Jump to content

Module:Title: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
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'
(No difference)

Revision as of 19:41, 22 August 2024

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