Module:EditAtWikidata: Difference between revisions
EnWikiAdmin (talk | contribs) m 1 revision imported |
EnWikiAdmin (talk | contribs) No edit summary |
||
Line 27: | Line 27: | ||
-- Parameter qid=x specifies the Wikidata ID for the article. | -- Parameter qid=x specifies the Wikidata ID for the article. | ||
-- This is not normally used except for testing outside the article. | -- This is not normally used except for testing outside the article. | ||
local qid = trimToNil(args.qid) or mw.wikibase.getEntityIdForCurrentPage() | local qid = trimToNil(args.qid) -- or mw.wikibase.getEntityIdForCurrentPage() | ||
if qid and mw.wikibase.entityExists(qid) then | if qid then -- and mw.wikibase.entityExists(qid) then | ||
-- Parameter pid=x uses x as an anchor in the link to the Wikidata entry. | -- Parameter pid=x uses x as an anchor in the link to the Wikidata entry. | ||
local anchor = trimToNil(args.pid) | local anchor = trimToNil(args.pid) |