I’m currently working on a Lua module (to replace wikitext, at least partly, in hu:Sablon:Cikktörténet), and it would be great if I could query the connected item (e.g. for featured articles in other languages, or to check if the badges passed as parameter match the badges stored in Wikidata). There is a function in the mw.wikibase module (client/includes/DataAccess/Scribunto/mw.wikibase.lua, around line 65) which gets the item ID based on mw.title.getCurrentTitle().prefixedText, this means for me that we could change it to content page name (since talk pages won’t have own connected items, so it won’t cause conflict).
- Mentioned Here
- rEWBA9394035a05fa: Adds mw.wikibase.getEntityIdForTitle to Scribunto
T133498: Detect and extend known title <-> entity links in a semi-automatic way
T142093: Decide how to do usage tracking for strings used to lookup entities (page titles, external ids, …)
T74815: [Task] Add Lua function to get Wikibase entity by site link (title)
Somewhat related to T142093: Decide how to do usage tracking for strings used to lookup entities (page titles, external ids, …). Not sure special functionality for this is needed, or we can just go with T133498/T74815.
Note that it is possible to have talk pages connected to repository if the wiki configuration allows that, and the item may be different from the one the associated page is connected to.