Difference between revisions of "Module:HerbGallery"
From A Wiki in the Desert
| Line 1: | Line 1: | ||
local p = {} --p stands for package | local p = {} --p stands for package | ||
| + | |||
| + | local g = require('Gallery') | ||
function p.gallery( frame ) | function p.gallery( frame ) | ||
| Line 6: | Line 8: | ||
end | end | ||
| − | if not | + | if not g then |
return "mw.Gallery module not found" | return "mw.Gallery module not found" | ||
end | end | ||
Revision as of 02:50, 15 May 2021
Documentation for this module may be created at Module:HerbGallery/doc
local p = {} --p stands for package
local g = require('Gallery')
function p.gallery( frame )
if not mw.smw then
return "mw.smw module not found"
end
if not g then
return "mw.Gallery module not found"
end
if frame:getParent().args[1] == nil then
return "no parameter found"
end
local myresult = ""
for num, row in pairs( frame:getParent().args ) do
myresult = myresult .. ' ' .. num .. ' ' .. type(row) .. '\n'
end
return frame:getParent().args[1]
end
return p