跳去內容

模組:Uses Wikidata

出自維基百科,自由嘅百科全書
模組解[]
local p = {}

function p.usesProperty(frame)
	local parent = frame.getParent(frame)
	local result = ''
	local ii = 1
	while true do
		local p_num = parent.args[ii] or ''
		if p_num ~= '' then
			local label = mw.wikibase.label(p_num) or "NO LABEL"
			result = result .. "<li><b>[[d:Property:" .. p_num .. "|" .. label .. " <small><i>(" .. string.upper(p_num) .. ")</i></small>]]</b> (睇[[d:Special:WhatLinksHere/Property:" .. p_num .. "|利用]])</li>"
			ii = ii + 1
		else break
		end
	end
	return result
end
 
return p