Modul:WProjekti/FF/wikidata

Izvor: Wikipedija
Dokumentacija modula[stvori]
local p = {}

function p.wd(frame)
	local entity = mw.wikibase.getEntity()
	local species = entity and entity:getSitelink('specieswiki')
	if species then
		local hrvrste = frame.args[1]  --prikazano hrv. ime
		hrvrste = hrvrste and mw.text.trim(hrvrste)
		hrvrste = hrvrste~='' and hrvrste
		return '[[:species:' .. mw.uri.encode( species, 'WIKI' ) .. '|' .. (hrvrste or species) .. ']]'
	end
	return ''
end

return p