Display title
Early draft
A display title is the preferred title associated with a wiki page. It typically provides the text that is shown in the title header of a page. It is conceptually and technically distinct from the page title, i.e. the title by which a page is recorded and made accessible over the web. By default, a display title is synonymous with the page title but can be customised to suit your needs.
Different wikis use different naming conventions for the page title and display title. For instance, the convention on a site like Wikipedia is that the page title of an article should be descriptive of the subject, while the display title may be customised only to adjust its formatting (lowercase initial, italics, superscript). Other wikis may prefer to use short, hash-generated page titles and leave the descriptive part to the display title only. Either approach is possible.
MediaWiki core
For users and site admins
- The title header of a page will usually give you the display title.
- The display title of a page can be checked by looking at the summary that is usually known as page information.
- Unless the option
$wgAllowDisplayTitle
is set to false, the magic word DISPLAYTITLE:... lets you set a custom display title for a page. To an extent, it allows for HTML formatting options such as italics. - Configuration settings:
- $wgAllowDisplayTitle (boolean) - whether or not custom display titles are at all allowed.
- $wgRestrictDisplayTitle (boolean) - whether or not customisation should be restricted to re-formatting.
For developers
- The display title is stored in the
page_props
table underpp_propname
. - It can be retrieved in PHP. See e.g.
- It can be retrieved over the API. See e.g. API:Pageprops.
Extensions
- Extension:DisplayTitle - builds on the use of the magic word DISPLAYTITLE by making sure that a wiki link to a page uses the display title as the default link text. It also provides a parser function to query a page's display title as well as an equivalent function for use in Lua.
- Extension:PageProperties - lets you edit the display title and other page properties with the aid of a form
- Extension:Semantic MediaWiki - builds on DISPLAYTITLE by automatically storing the display title in a special property caled "Display title of". See https://www.semantic-mediawiki.org/wiki/Help:Display_title