A Wiki in the Desert
Log in

Difference between revisions of "Module:HerbGallery"

From A Wiki in the Desert
Line 12: Line 12:
 
     local myresult = ""
 
     local myresult = ""
 
     for num, row in pairs( frame:getParent().args ) do
 
     for num, row in pairs( frame:getParent().args ) do
     myresult = num .. ' ' .. row
+
     myresult = num .. ' ' .. row .. '\n'
 
     end
 
     end
 
      
 
      

Revision as of 02:45, 15 May 2021

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

local p = {} --p stands for package

function p.gallery( frame )
	if not mw.smw then
        return "mw.smw 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 = num .. ' ' .. row .. '\n'
    end
    
    return myresult
end

return p