Diferencia entre revisiones de «Módulo:Wikibase»

m Protegió «Módulo:Wikibase»: Segunda página más transcluida del proyecto, alto riesgo ([Editar=Solo bibliotecarios] (indefinido) [Pueden trasladar=Solo bibliotecarios] (indefinido))
Página creada con «-- Module:Wikibase local p = {} -- Devuelve la ID del ítem, el nombre o el enlace de la página en la wiki local. function p.id(frame) if not mw.wikibase then...»
Línea 43: Línea 43:
   
   
         return mw.wikibase.sitelink( id )
         return mw.wikibase.sitelink( id )
end
-- Devuelve la descripción de un ítem dado.
function p.descripcion(frame)
        if frame.args[1] == nil then
            entity = mw.wikibase.getEntityObject()
            if not entity then return nil end
            id = entity.id
        else
            id = frame.args[1]
        end
        return mw.wikibase.description( id )
end
end
   
   
return p
return p