Difference between revisions of "Module:Entity"
Jump to navigation
Jump to search
Line 9: | Line 9: | ||
end | end | ||
function p.getSiteLink ( frame ) | function p.getSiteLink ( frame ) | ||
− | return mw.wikibase.getSitelink(mw.wikibase.getEntityIdForTitle(frame.args[ | + | return mw.wikibase.getSitelink(mw.wikibase.getEntityIdForTitle(frame.args[0])) |
end | end | ||
return p | return p |
Revision as of 21:07, 13 April 2019
Documentation for this module may be created at Module:Entity/doc
local p = {} -- p stands for package function p.get( frame ) return mw.wikibase.getEntityIdForTitle(mw.title.getCurrentTitle().text) end function p.getUrl ( frame ) return mw.wikibase.getEntityUrl(mw.wikibase.getEntityIdForTitle(mw.title.getCurrentTitle().text)) end function p.getSiteLink ( frame ) return mw.wikibase.getSitelink(mw.wikibase.getEntityIdForTitle(frame.args[0])) end return p