Module:Album: Difference between revisions
From The Coffin of Andy and Leyley
(might fix image issue) Tag: Reverted |
No edit summary Tag: Manual revert |
||
(One intermediate revision by the same user not shown) | |||
Line 13: | Line 13: | ||
} ) | } ) | ||
retval:addImage( args.image, args.imagecaption ) | |||
if v(args.artist) then retval:addRow( 'Artist', args.artist ) end | if v(args.artist) then retval:addRow( 'Artist', args.artist ) end | ||
if v(args.released) then retval:addRow( 'Released', args.released ) end | if v(args.released) then retval:addRow( 'Released', args.released ) end |
Latest revision as of 18:04, 2 January 2024
Documentation for this module may be created at Module:Album/doc
local capiunto = require 'capiunto'
local p = {}
local function v( val, name )
return (val ~= nil) and ((type( val ) == 'string' and val ~= '') or type( val ) == 'number')
end
function p.main(frame)
local args = frame:getParent().args
local retval = capiunto.create( {
title = args.title,
} )
retval:addImage( args.image, args.imagecaption )
if v(args.artist) then retval:addRow( 'Artist', args.artist ) end
if v(args.released) then retval:addRow( 'Released', args.released ) end
if v(args.recorded) then retval:addRow( 'Recorded', args.recorded ) end
if v(args.length) then retval:addRow( 'Length', args.length ) end
if v(args.label) then retval:addRow( 'Label', args.label ) end
if v(args.producer) then retval:addRow( 'Producer', args.producer ) end
return retval
end
return p