Module:Sandbox/Aude/NRHP

local p = {}

local function makeNRHPReferenceLink( number ) return '[http://focus.nps.gov/AssetDetail/NRIS/' .. number .. ' ' .. number .. ']' end

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 makeNRHPReferenceLink( mw.wikibase.renderSnak( snak ) ) end end return 'no entity' end

return p