יחידה:PropertyLink: הבדלים בין גרסאות בדף

אין תקציר עריכה
אין תקציר עריכה
שורה 503: שורה 503:


-- returns the wikidata Qid, if exists, "" otherwise
-- returns the wikidata Qid, if exists, "" otherwise
function getPageEntry()
function getPageEntry(frame)
    local entity = mw.wikibase.getEntityIdForCurrentPage()
return mw.wikibase.getEntityIdForTitle(string.upper(frame.args[1] ))
    --if not entity or not entity.claims then return end --the entity doesnt exist or have no claims
    if not entity then return end --the entity doesnt exist or have no claims
    return entity
end
end