Add Wikidata and Wikimedia Commons links to work page
Fixes
Fixes the microtask T406950
Description
This fix will display, along with the Wikipedia link, links to Wikidata and Wikimedia Commons if they are available.
It is a nice addition for users to get access to more information about a specific piece of work.
Checklist
-
Inside pdclasses.pyfile, and inside theclass Work, create acommons_linkproperty -
Inside the app.pyfile, and inside thework_pagefunction, create (and return) a variable namedwork_commons_linkthat contains the value of the propertycommons_link -
Maintain codebase common practice by analysing how the links are displayed inside author.html -
Remove the <p>that was wrapping the<a>tag containing links -
Adding a <div>to wrap the<a>tag and display them as a row, using|as a separator -
Add some spacing between the links -
Remove all unnecessary comments from files -
Place the separator |inside theifstatement and just before the<a>tag, and reorder the links (to avoid having separators "lying around the page")
Screenshots
| Before | After |
|---|---|
![]() |
![]() |
To take it further:
For small screens, we could add a @media-query to display the links as columns.

