Module:GetRels

From Bodhicitta
Revision as of 12:37, 3 July 2024 by Jeremi (talk | contribs) ((by SublimeText.Mediawiker))

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

local p = {}

function p.main(frame)

	local pdata = mw.loadData('Module:GetData/relationships')
	local pargs = frame:getParent().args
	if not pdata then
		return 'No relationships!'
	else
		local output = '<h1>Relationships</h1>'

		if type(pdata) == "table" then
		    for _, data in ipairs( pdata ) do
		    	output = output .. '<div><i>' .. data.Relationship .. '</i>: ' .. data.RelatedTo .. '</div>'
		    end
		end

		return output
	end
end

return p