Module:Test
Jump to navigation
Jump to search
Documentation for this module may be created at Module:Test/doc
local p = {}
local getArgs = require('Module:Arguments').getArgs
function p.test(frame)
local parent_frame = frame:getParent()
frame:callParserFunction('#vardefine:frame_name','test_frame_name')
parent_frame:callParserFunction('#vardefine:parent_frame_name', 'test_parent_frame_name')
end
function p.test2(frame)
page = mw.title.new('Vira (SSR)', '')
return page:getContent()
end
function p.test3(frame)
local o = {}
for k,v in pairs(frame.args) do
o[#o+1] = ("%s=%s<br><br>"):format(k, frame:callParserFunction('#tag:nowiki', v))
end
return table.concat(o, "")
end
function p.nesting(frame)
local args = getArgs(frame, {
trim = true,
removeBlanks = true,
parentFirst = true,
})
local a = args['a'] or ''
local b = args['b'] or ''
local c = args['c'] or ''
local d = args['d'] or ''
local e = args['e'] or ''
return a..'-'..b..'-'..'-'..c..'-'..d..'-'..e
end
return p