Module:FileDescription

From TwogPedia
Revision as of 22:38, 8 May 2023 by Couchor (talk | contribs) (Created page with "local getArgs = require('Module:Arguments').getArgs local p = {} function p.main(frame) local args = getArgs(frame) local imageTitle = mw.title.new(args[1], "File") local description = imageTitle:getContent() if description then return description else return nil end end return p")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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

local getArgs = require('Module:Arguments').getArgs
local p = {}

function p.main(frame)

local args = getArgs(frame)
local imageTitle = mw.title.new(args[1], "File")
local description = imageTitle:getContent()

if description then
   return description
else
    return nil
end

end

return p