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 "Allows to store and query data annotated to pages |
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 |
Table of Contents | |
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[edit]
- 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, theDISPLAYTITLE
value will be used asSORTKEY
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
$smwgDVFeatures
Sets 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 theSMW_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[edit]
- Page "Issue/1617" on <sandbox.semantic-mediawiki.org>
- Property "Display title of" on <sandbox.semantic-mediawiki.org>
- Page "Q1339" on <sandbox.semantic-mediawiki.org>
Notes[edit]
- 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[edit]
- MediaWiki help page on magic word
{{DISPLAYTITLE:title}}
- MediaWiki help page on magic word
{{DEFAULTSORTKEY:sortkey}}
- Help page on configuration parameter
$smwgDVFeatures
Sets the available features regarding property data values - MediaWiki user manual on configuration setting
$wgAllowDisplayTitle
- MediaWiki user manual on configuration setting
$wgRestrictDisplayTitle
References
- ^ Semantic MediaWiki: GitHub pull request gh:smw:1410
- a b Semantic MediaWiki: GitHub pull request gh:smw:1534
- ^ Semantic MediaWiki: User mailing list thread "Ask and Display title"
- ^ Semantic MediaWiki: GitHub pull request comment gh:smw:1410:244064848