ماڈیول:Infobox road junction
دستاویز [تخلیق]
شاید آپ اس اسکریبنٹو ماڈیول کا دستاویزی صفحہ تخلیق کرنا چاہتے ہیں۔ صارفین ماڈیول کے تختہ مشق (تخلیق | آئینہ) اور ثابتات (تخلیق) میں تجربات کرسکتے ہیں۔ براہ کرم /دستاویز کے ذیلی صفحہ پر زمرہ جات شامل فرمائیں۔ اس ماڈیول کے ذیلی صفحات۔ |
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 or ''
if map == '' then
local entity = mw.wikibase.getEntity() or {}
local claims = entity.claims or {}
local mapProp = claims.p15
if not mapProp then
return ""
end
map = mapProp[0].mainsnak.datavalue.value
end
local alt = args.map_alt or ''
return "[[File:" .. map .. "|250px|alt=" .. alt .. "]]"
end
return p