Template:Qid

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search
Template documentationview · edit · history · purge ]
This documentation is transcluded from Template:Qid/doc.

This template is a wrapper for function followQid in Module:WikidataIB

Usage[edit]

It takes two optional parameters: |qid= and |props=

  • If qid is not given, it uses the qid for the connected page or returns nil if there isn't one.
  • props is a list of properties, separated by any normal punctuation.
  • If props is given, the Wikidata item for the qid is examined for each property in turn.
  • If a property of the Wikidata item contains a value that is another Wikibase-item, then that item's qid is returned, and the search terminates.
  • If props is not given, the qid is returned.

Example[edit]

  1. Searching Subgraph isomorphism in graph classes (Q29031096) for instance of (P31)
    • {{qid |qid=Q29031096 |props=P31}} → Q13442814
    This is the entity-id for scholarly article (Q13442814).
  2. Pasting {{qid}} into Category:Matterhorn produces Q7485316 (the Wikidata entity-id for Category:Matterhorn (Q7485316)).

See Also[edit]

Template:GetQID – similar functionality, but returns the Wikidata entity-id of the category's main topic (P301), or the associated page's Wikidata entity-id in that order of priority.