Special property "Display title of"

From semantic-mediawiki.org
Display title of
Holds a specific denote title for an entity
Further Information
Provided by: extension "Semantic MediaWiki "Semantic MediaWiki (SMW) is a free, open-source extension to MediaWiki that lets you store and query data within the wiki's pages. Semantic MediaWiki is also a full-fledged framework, in conjunction with many spinoff extensions, that can turn a wiki into a powerful and flexible knowledge management system. All data created within SMW can easily be published via the Semantic Web, allowing other systems to use this data seamlessly.
Added: 2.4.0
Removed: still in use
Alias: has no alias
Optional: yes
Visible: no
Annotable: yes
Declarative: no
Key:
_DTITLE
Setting:
SMW_DV_PROV_DTITLE
Focus: page information
In this wiki: Property:Display title of

The Display title of property is a special property in Semantic MediaWiki with a built-in meaning: it supports an automated annotation operation when {{DISPLAYTITLE:title to be displayed}} is being used thus holding it's specific denote title. It was introduced starting with Semantic MediaWiki 2.4.0Released on 9 July 2016 and compatible with MW 1.19.0 - 1.27.x..1

For {{DISPLAYTITLE:title to be displayed}} to work as described the following configuration settings provided by MediaWiki core have to be set:
$wgAllowDisplayTitle = true;
$wgRestrictDisplayTitle = false;

Features and limitations

  • This special property can also be used as "free" annotation |Display title of=Bar to change the display title characteristics of a subobject if needed. Otherwise it inherits the display attributes from the root subject, i.e. the page used for storing the subobject.
  • In case a page contains both the magic word {{DISPLAYTITLE:Foo}} and an special property annotation [[Display title of::Bar]] then the magic word {{DISPLAYTITLE:Foo}} will take precedence over the preferred title set via this special property.
  • Unless no other variable DEFAULTSORTKEY is annotated, the DISPLAYTITLE value will be used as SORTKEY and replaces the content of the database sortfield.2
  • This feature is enabled by default and to disable this behaviour for Semantic MediaWiki (not MediaWiki) configuration parameter $smwgDVFeaturesSets the available features regarding property data values needs to be adjusted accordingly. See this configuration parameter for details on how to alter3 the setting in connection with the SMW_DV_WPV_DTITLE feature flag.
  • The characters < and > are stripped from a text to avoid HTML injections that may distort display and search characteristics

Examples

Notes

  • This feature makes use of the "CachedPropertyValuesPrefetcher" to allow repeated requests to a title or subject being prefetched from cache and free the "Store" from extensive lookup queries. Therefore it is suggested to use redis as cache backend to provide the best possible response time.
  • If you happen to disable this feature then it is most likely that the sortfield2 still contains a reference to a previous display title therefore it is necessary to update those entities in order for the default sort content to be restored.
  • It has been noted4 that support for {{DISPLAYTITLE:title}} in Semantic MediaWiki "... is complementary to the functionality provided by extension "Semantic Title"Sets visible page title to value of a semantic property ... ".

See also



References

  1. ^  Semantic MediaWiki: GitHub pull request gh:smw:1410
  2. a b  Semantic MediaWiki: GitHub pull request gh:smw:1534
  3. ^  Semantic MediaWiki: User mailing list thread "Ask and Display title"
  4. ^  Semantic MediaWiki: GitHub pull request comment gh:smw:1410:244064848