More actions
Created page with "local p = {} function p.Get(frame) local args = {} -- get the arguments if frame == mw.getCurrentFrame() then args = frame:getParent().args else args = frame.args end local title = mw.title.getCurrentTitle() return title.fragment end return p" |
No edit summary |
||
(3 intermediate revisions by the same user not shown) | |||
Line 13: | Line 13: | ||
local title = mw.title.getCurrentTitle() | local title = mw.title.getCurrentTitle() | ||
return | |||
local out = "" | |||
for k,v in pairs(title) do | |||
out = out .. tostring(k) .. ": " .. tostring(v) .. "<br>" | |||
end | |||
return out | |||
end | end | ||
return p | return p |
Latest revision as of 01:06, 21 September 2025
Documentation for this module may be created at Module:UrlParamTest/doc
local p = {}
function p.Get(frame)
local args = {}
-- get the arguments
if frame == mw.getCurrentFrame() then
args = frame:getParent().args
else
args = frame.args
end
local title = mw.title.getCurrentTitle()
local out = ""
for k,v in pairs(title) do
out = out .. tostring(k) .. ": " .. tostring(v) .. "<br>"
end
return out
end
return p