classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view


This post has NOT been accepted by the mailing list yet.
TLDR: A new extension, DisplayTitle, has been released [0]. It contains that parts of SemanticTitle that depend only on MediaWiki core. A new version of SemanticTitle has been released [1]. It retains only the portions of SemanticTitle that depend on Semantic MediaWiki or Cargo.


The SemanticTitle extension was created to provide two distinct types of functionality: 1) setting a page's display title to something other than the page's title and 2) viewing that display title either as the link text in links to the page or as a result of a parser function call.

MediaWiki core provides a built in magic word, DISPLAYTITLE, to set the display title of a page [2]. It stores this display title as a page property in the MediaWiki page_props table [3]. However, prior to version 3.0, SemanticTitle did not use the page_props table. If the built-in MediaWiki DISPLAYTITLE magic word were used to set the display title, the SemanticTitle features to view a display title would not be aware of this display title. Therefore, to better integrate with MediaWiki core features, SemanticTitle was rewritten in version 3.0 to use the page_props table.

Since the DISPLAYTITLE magic word could now be used in conjunction with the SemanticTitle features to view the display title, this in most if not all cases in common use eliminated the need to use SemanticTitle to set the display title from a Semantic MediaWiki property or Cargo field. Further, setting the display title from a Semantic MediaWiki property or Cargo field sometimes requires an additional null edit to make the new display title appear. So, starting from version 3.0 of SemanticTitle, using DISPLAYTITLE to set the value of a page's display title became recommended over using a Semantic MediaWiki property or Cargo field to do so.

However, now the bulk of the useful functionality in SemanticTitle did not require Semantic MediaWiki or Cargo: using the displaytitle page property in link text and the talk page title; optionally displaying the original page title as a subtitle; and providing a parser function to query a page's display title. This generated quite a bit of confusion in the use of the extension.

Therefore, the functionality that is only dependent on MediaWiki core has been moved into a new extension, DisplayTitle. Using the classification in the first paragraph above, SemanticTitle contains the functionality in 1) and DisplayTitle contains the functionality in 2). The two extensions are independent of one another. DisplayTitle can be (and usually will be) used without SemanticTitle. SemanticTitle, however, while it can be used without DisplayTitle, is more useful when used with DisplayTitle. The SemanticTitle extension is being maintained primarily for backward compatibility.

As an additional note, James HK added functionality into Semantic MediaWiki version 2.4 that makes the display title value from the page_props table available as the 'Display title of' property [4] and enables this to be used in JavaScript-based semantic result formats [5]. This feature complements DisplayTitle's functionality to sets static link text appropriately. The Semantic MediaWiki functionality does not depend on SemanticTitle or DisplayTitle.


[0] https://www.mediawiki.org/wiki/Extension:Display_Title
[1] https://www.mediawiki.org/wiki/Extension:Semantic_Title#Caveats
[2] https://www.mediawiki.org/wiki/Help:Magic_words#Technical_metadata
[3] https://www.mediawiki.org/wiki/Manual:Page_props_table
[4] https://github.com/SemanticMediaWiki/SemanticMediaWiki/pull/1410
[5] https://github.com/SemanticMediaWiki/SemanticMediaWiki/pull/1423