User:FRDian/Pagebanner
local p = {} function p.main(frame) args = frame:getParent().args entity = mw.wikibase.getEntityObject()
text = '
'
if disambig then text = text..'\n:其他同名地点的条目,请见'..disambig..' (消歧义)。' end return text end
return p
local p = {} function p.main(frame) args = frame:getParent().args entity = mw.wikibase.getEntityObject()
text = '
title = mw.title.getCurrentTitle() if title.namespace == 2 then
text = text .. 'else if not (args.novariant or args["不转换"]) then text = text .. require("Module:NoteTA").main{ G1 = "地名", G2 = "地区用词" } end end
text = text..'text = text..(args.pgname or args["页名"] or args["頁名"] or title.subpageText)
text = text..'disambig = args.disambig or args["消歧义"] or args["消歧義"] size = args.size or 25 if disambig then if disambig == 'yes' then disambig = title.text end text = text..'" end if args.UNESCO or args.unesco or args["世界遗产"] or args["世界遺產"] then text = text..'' end if args.star or args["明星"] then text = text..'' end if args.otbp or args["曲径通幽"] or args["曲徑通幽"] then text = text..'' end if args.dotm or args["目的地"] then text = text..'' end if args.ftt or args["特色话题"] or args["特色話題"] then text = text..'' end
text = text..''
image = args[1] if (not image) or defaultimage[image] then if entity and entity.claims and entity.claims["P948"] and entity.claims["P948"][1].mainsnak.datavalue.value then image = entity.claims["P948"][1].mainsnak.datavalue.value else image = defaultimage[image or "none"] end end if title.namespace == 0 then if image == "Disambiguation banner.png" then text = text.. elseif args.index then elseif entity and entity.claims and entity.claims["P948"] and entity.claims["P948"][1].mainsnak.datavalue.value then text = text.. elseif defaultimage[image] then text = text.. else text = text.. end end
text = text..''..(args.caption or args["说明"] or args["說明"]) end text = text..''
if disambig then text = text..'\n:其他同名地点的条目,请见'..disambig..' (消歧义)。' end return text end
return p