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).
Description
Related Objects
- 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)
Event Timeline
Can you please clarify what you want? It is already possible to access the data of any item on huwiki.
Yes, in a bit "lighter" version, because we do have arbitrary access, but (as far as I know) we can't get the ID from the talk page (which is currently required to get the item).
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.
For projects using talk pages for maintenance templates and categories, this could be helpful.
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.
@Tacsipacsi It sounds like you want: mw.wikibase.getEntityIdForTitle(mw.title.getCurrentTitle().subjectPageTitle.prefixedText)
Is there some reason why that does not work for you?
Nothing, except for that this function didn’t exist in August 2016, as it was added in 9394035a05fa.