Edge Rewrite
// request.cf · coarse context

A page that knows where it met you.

Only coarse request metadata is shown. This demo does not display or persist visitor IP addresses.

Country
US
Cloudflare location
CMH
Connection
HTTP/2
Language
Not provided

Ray ID: a27bb9cebd9c5751

Jump to content

Module:Sandbox/RexxS/Images

From Wikipedia, the free encyclopedia

local p = {}
 
-- This is used to return an image filename from Wikidata (property p18), or "Noimage.svg" if none exists
p.getImage = function(frame)
	local ent = mw.wikibase.getEntityObject()
	local props = ent:formatPropertyValues('P18')
	local out = {}
	for k, v in pairs(props) do
		if k == 'value' then
			out[#out + 1] = v
		end
	end
	ret = table.concat(out, ", ")
	if #ret == 0 then
		ret = "Noimage.svg"
	end
	return ret
end

return p