Difference between revisions of "Module:Sandbox/BrandonXLF/2/example"

From blackwiki
Jump to navigation Jump to search
blackwiki>BrandonXLF
m (16 revisions imported)
 
(6 intermediate revisions by one other user not shown)
Line 1: Line 1:
--[[ This module acts like example templates for the parent modules documetaion page ]]--
+
-- {{g7}}
 
 
local p = {}
 
 
 
function p.main (frame)
 
local args = frame.args
 
local module = 'Sandbox/BrandonXLF/2'
 
local arguments = {
 
[1]  = '|main|item|, ',
 
[2]  = '|main||, ||| and ',
 
[3]  = '|main||, |•|•| and ',
 
[4]  = '|main|x| & ',
 
[5]  = '|main|x| & |item $i: ',
 
[6]  = '|bulleted',
 
[7]  = '|unbulleted',
 
[8]  = '|horizontal',
 
[9]  = '|ordered',
 
[10] = '|commas',
 
[11] = '|list',
 
}
 
 
local out = frame:preprocess('{{#invoke:'..module..arguments[tonumber(args['EXAMPLE'])]..'}}')
 
 
if args['CODE'] then
 
out = '<pre>'..'{{#invoke:'..module..arguments[tonumber(args['EXAMPLE'])]..'}}'..'</pre>'
 
end
 
 
return out
 
 
 
end
 
 
 
return p
 

Latest revision as of 09:27, 27 September 2020

Documentation for this module may be created at Module:Sandbox/BrandonXLF/2/example/doc

-- {{g7}}