No edit summary |
No edit summary |
||
Line 2: | Line 2: | ||
p.queryOverride = function(frame) | p.queryOverride = function(frame) | ||
local | local args = frame:getParent().args | ||
local id = args['id'] | |||
if id == nil then | if id == nil then | ||
return "Error: no id" | return "Error: no id" | ||
end | end | ||
args['id'] = nil | |||
local root = mw.html.create('div') | local root = mw.html.create('div') | ||
for k,v in pairs( | for k,v in pairs(args) do | ||
root:node(mw.html.create('div'):wikitext(k .. ": " .. v)) | root:node(mw.html.create('div'):wikitext(k .. ": " .. v)) | ||
end | end |
Revision as of 22:38, 21 August 2023
Documentation for this module may be created at Module:Move7/doc
local p = {};
p.queryOverride = function(frame)
local args = frame:getParent().args
local id = args['id']
if id == nil then
return "Error: no id"
end
args['id'] = nil
local root = mw.html.create('div')
for k,v in pairs(args) do
root:node(mw.html.create('div'):wikitext(k .. ": " .. v))
end
return root
end
return p