Module:Sandbox/Aude/NRHP

This is an old revision of this page, as edited by Aude (talk | contribs) at 09:51, 22 June 2016 (test). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
local p = {}

function p.getNRHPReference(frame)
	local entity = mw.wikibase.getEntity()
	
	if entity then
		local claims = entity['claims']['P649']
		
		for idx in pairs(claims) do
			local snak = claims[idx].mainsnak;
			return mw.wikibase.renderSnak( snak )
		end
	end
	
	return 'no entity'
end

return p