Change the order of properties rendered in Wikibase

222 Views Asked by At

Within Wikidata the properties P31 (instance of) and P279 (subclass of) - when stated - are always the first statements in the set of statements of a wikidata item.

On a random wikibase install, the properties simply follow the order in which they are created. I would like to know how I can configure a wikibase to replicate the behaviour from Wikidata where a custom property order can be defined

1

There are 1 best solutions below

0
On BEST ANSWER

The order of the statements in a given Wikibase installation is determined by the list in the page MediaWiki:Wikibase-SortedProperties. The Wikidata own file is located at https://www.wikidata.org/wiki/MediaWiki:Wikibase-SortedProperties

The instructions on how to enable the option in the configuration file are on this page https://www.mediawiki.org/wiki/Manual:Interface/Wikibase-SortedProperties.

You can also refer to the Phabricator task https://phabricator.wikimedia.org/T250634 for further technical details.

By the way, this sorting also affect the output of the mw.wikibase.getPropertyOrder LUA function as described here https://www.mediawiki.org/wiki/Extension:Wikibase_Client/Lua#mw.wikibase.getPropertyOrder