Module:TestMod: Difference between revisions
Jump to navigation
Jump to search
(ok so apparently you can't just get the args directly and you need to use a "frame") |
(hmm) |
||
(One intermediate revision by the same user not shown) | |||
Line 2: | Line 2: | ||
function p.hello( frame ) | function p.hello( frame ) | ||
local args = frame:getParent().args | |||
local templateArgs = frame.args | |||
end | end | ||
return | return templateArgs |
Revision as of 14:04, 17 April 2024
Basic test Lua module, can be invoked with {{#invoke: TestMod|FunctionName|arg1|arg2|etc ...}}
local p = {} --p stands for package function p.hello( frame ) local args = frame:getParent().args local templateArgs = frame.args end return templateArgs