Module:taxref

local export = {}

function export.show(frame) local args = frame:getParent.args local qid = args[1] local entity = mw.wikibase.getEntity(qid) local i = args.i	local wp = entity:getSitelink('enwiki') local ws = entity:getSitelink('specieswiki') local commons = entity:formatPropertyValues('P373') local res = "" if wp then res = res .. "* " .. frame:expandTemplate{ title = "pedia", args = { i=i, wp }, } .. '\n' end if ws then res = res .. "* " .. frame:expandTemplate{ title = "specieslite", args = { i=i, ws }, } .. '\n' end if commons and commons.label == "Commons category" and commons.value ~= "" then res = res .. "* " .. frame:expandTemplate{ title = "comcatlite", args = { i=i, nil, commons.value }, } .. '\n' end return res end

return export