Open main menu
Home
Random
Log in
Settings
Give to Wikipedia
About KidzSearch Wiki
Disclaimers
KidzSearch Wiki
Search
Changes
kidzsearch.com
>
wiki
>
Infobox road/map
← Earlier diff
Module:Infobox road/map
(view source)
Revision as of 02:01, 19 May 2023
486 bytes removed
,
02:01, 19 May 2023
no edit summary
Line 14:
Line 14:
end
end
if map == '' then
if map == '' then
−
local currentEntityId = mw.ext.UnlinkedWikibase.getEntityId('enwiki')
+
return ""
−
if currentEntityId then
−
local entity = mw.wikibase.getEntity(currentEntityId) or {}
−
else
−
local entity = {}
−
end
−
local claims = entity.claims or {}
−
local mapProp = claims.p15
−
if not mapProp then -- no claim of that property
−
return ""
−
end
−
map = mapProp[0].mainsnak.datavalue.value -- This should eventually iterate over all possible values?
end
end
local filecode = "[[File:" .. map .. "|"
local filecode = "[[File:" .. map .. "|"
Wikibase-admin
Bots
,
Bureaucrats
,
Interface administrators
,
Suppressors
,
Administrators
115
edits