Difference between revisions of "Module:Test"

From Granblue Fantasy Wiki
Jump to navigation Jump to search
m
Line 15: Line 15:
 
local o = {}
 
local o = {}
 
for k,v in pairs(frame.args) do
 
for k,v in pairs(frame.args) do
o[#o+1] = "%s=<nowiki>[%s]</nowiki><br><br>"
+
o[#o+1] = ("%s=<nowiki>[%s]</nowiki><br><br>"):format(k,v)
 
end
 
end
 
return table.concat(o, "")
 
return table.concat(o, "")

Revision as of 20:39, 13 January 2020

Documentation for this module may be created at Module:Test/doc

local p = {}

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=<nowiki>[%s]</nowiki><br><br>"):format(k,v)
	end
	return table.concat(o, "")
end

return p