Jump to content

Module:TestGetReferencedEntities: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Created a test module to investigate issue T226925
 
No edit summary
Tag: Reverted
Line 1: Line 1:
local p = {}
local p = {}


function p.test(frame)
function p.subscribeToAllAspects(frame)
-- wikidata sandbox QID for testing
mw.wikibase.getReferencedEntityId( 'Q637739', 'P31', { 'Q7397', 'Q2095', 'Q55488' } )
local qid = 'Q4115189'
local entity = mw.wikibase.getEntity ( qid );
if entity then
-- return '[[' .. entity:getSitelink( ) .. ']]'
return '[[' .. mw.wikibase.addDescriptionUsage( qid ) .. ']]'
end
end
end



Revision as of 09:45, 3 March 2025

local p = {}

function p.subscribeToAllAspects(frame)
	-- wikidata sandbox QID for testing 
	local qid = 'Q4115189' 
	local entity = mw.wikibase.getEntity ( qid );
	if entity then
--		return '[[' .. entity:getSitelink( ) .. ']]'
		return '[[' .. mw.wikibase.addDescriptionUsage( qid ) .. ']]'
	end
end

return p