Anonimo

Modulo:DTBase: differenze tra le versioni

Da Wikitrek.
nessun oggetto della modifica
mNessun oggetto della modifica
Nessun oggetto della modifica
Riga 279: Riga 279:
return Value
return Value
end
end
function p.LabelOrLink(QItem)
function p.LabelOrLink(QItem, SMWProperty, AddSemantic)
local Label
local Label
local WTLink
local WTLink
if (not AddSemantic) and SMWProperty ~= "" then
AddSemantic = true
else
AddSemantic = false
end
local Item = mw.wikibase.getEntity(QItem)
local Item = mw.wikibase.getEntity(QItem)
Riga 305: Riga 311:
Label = WTLink
Label = WTLink
end
end
return "[[" .. WTLink .. "|" .. Label .. "]]"
if AddSemantic then
return "[[" .. SMWProperty .. "::" .. WTLink .. "|" .. Label .. "]]"
else
return "[[" .. WTLink .. "|" .. Label .. "]]"
end
end
end
end
end