Module:TestWikidata: Difference between revisions
From TITAF TANGOWIKI
(Created page with "local p = {} function p.getLabel(frame) local entityId = frame.args[1] or "Q42" -- Defaults to Douglas Adams (Q42) return mw.wikibase.getLabel(entityId) or "Label not found" end return p") |
No edit summary |
||
| Line 2: | Line 2: | ||
function p.getLabel(frame) | function p.getLabel(frame) | ||
local entityId = frame.args[1] or " | local entityId = frame.args[1] or "Q76" -- Default to Barack Obama (Q76) | ||
return mw.wikibase.getLabel(entityId) or "Label not found" | return mw.wikibase.getLabel(entityId) or "Label not found" | ||
end | end | ||
return p | return p | ||
Latest revision as of 21:17, 20 March 2025
Documentation for this module may be created at Module:TestWikidata/doc