From Rhizome Artbase
Jump to navigation Jump to search

Documentation for this module may be created at Module:sandbox/getProps/doc

--can't get this mw.wikibase function to work. 
--created Template:sandbox/getProps
--error: Lua error in Module:sandbox/getProps at line 6: attempt to call method 'getProperties' (a nil value).
--Is this because I need to add the mw.wikibase.entity? 
--had same problem with: mw.wikibase.resolvePropertyId, now in Module:sandbox/wikibase

local p = {}

function p.getProps(frame)
    for item_num = 4930,4940 do
        local item_id = "Q" .. item_num
        local props = mw.wikibase.entity:getProperties ( item_id )
        if props == nil then 
            props = ""
return props
return p