Module:Infobox road
Appearance
Documentation for this module may be created at Module:Infobox road/doc
local p = {}
function p.map(frame)
local pframe = frame:getParent()
local config = frame.args -- the arguments passed BY the template, in the wikitext of the template itself
local args = pframe.args -- the arguments passed TO the template, in the wikitext that transcludes the template
local map = args.map
if map and map ~= '' then return map end
local entity = mw.wikibase.getEntity()
local claims = entity.claims or {}
local mapProp = claims["p15"]
if not mapProp then -- no claim of that property
return ""
end
local propValue = mapProp[0].mainsnak.datavalue.value -- This should eventually iterate over all possible values?
return propvalue
end
return p