**Main components:**
* COMPONENTS
**User story:**
As an ... I want to ... in order to ...
**Problem:**
The sidebar link to Wikimedia Commons on various Wikipedias currently uses `P373` ("commons category"). It would be better to use the interwiki sitelinks to Commons instead.
This is one of the blockers for the eventual deletion of `P373` ("commons category") from Wikidata - see the ongoing discussion at https://www.wikidata.org/wiki/Wikidata:Properties_for_deletion#Property:P373
**Steps to reproduce:**
**Example:**
**Screenshots:**
**Solution:**
To use the interwiki sitelinks to Commons the logic would be:
1) If there is a sitelink to Commons in the attached Wikidata item, use that (optional: unless it is to a gallery page)
2) If there is a `P910` ("topic's main category") value, follow that to the category item and use the sitelink to Commons from there
3) If there is a `P1754` ("category related to list") value, follow that to the category item and use the sitelink to Commons from there
4) Otherwise, display nothing.
This follows the logic of the "_getCommonslink" function of https://commons.wikimedia.org/wiki/Module:WikidataIB - which is used to display the links in https://en.wikipedia.org/wiki/Template:Commons_category .
**Mockups:**
**BDD:**
GIVEN
AND
WHEN
AND
THEN
AND
**Acceptance criteria:**
[]
[]
**Open questions:**
**Community communication:**
Who we needs to keep in the loop and in what way:
Who this could be interesting for and in what way:
**Original:**