Module:ExperiencePicture: Difference between revisions

From Wikiyouth
No edit summary
No edit summary
Line 3: Line 3:
function p.main(frame)
function p.main(frame)
   local args = frame:getParent().args
   local args = frame:getParent().args
   local ret = ''
 
  for k, v in pairs(args) do
   local picture = 'File:Person reading a newspaper (Unsplash).jpg'
    ret = ret .. ',' .. k .. ',' .. v
 
  end
if args['picture'] ~= nil and args['picture'] ~= 'File:'  then
   return ret
  picture = 'File:' .. args['picture']
end
 
   return '[[ ' .. picture ..  '|100px|link=]]'
end
end


return p
return p

Revision as of 15:20, 1 November 2024

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

local p = {}

function p.main(frame)
  local args = frame:getParent().args

  local picture = 'File:Person reading a newspaper (Unsplash).jpg'

if args['picture'] ~= nil and args['picture'] ~= 'File:'  then
   picture = 'File:' .. args['picture']
end

  return '[[ ' .. picture ..  '|100px|link=]]'
end

return p