Movatterモバイル変換


[0]ホーム

URL:


Jump to content
MediaWiki
Search

Display title

From mediawiki.org
Translate this page
Languages:

Adisplay title is the preferred title associated with a wiki page.It typically provides the string of text that is shown in the title header of a page.It is conceptually and technically distinct from thepage 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 take on some formatting that page titles don't support (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

[edit]

For users and site admins

[edit]
  • The display title is usually visible as the title header of a page. A more reliable method of checking it, however, is by looking at the summary table that is usually known asPage information.
  • Unless the option$wgAllowDisplayTitle is set tofalse, the magic wordDISPLAYTITLE lets you set a custom display title for a page. To an extent, it allows for HTML formatting options such as italics.

Configuration settings:

NameTypeDescriptionDefault
$wgAllowDisplayTitlebooleanwhether or not custom display titles are allowed to be set using DISPLAYTITLE.true
$wgRestrictDisplayTitlebooleanwhether or not customisation should be restricted to formatting.true

For developers

[edit]
  • The display title is stored in rows of thepage_props table wherepp_propname equals'displaytitle'. Its value is stored inpp_value.
  • It can be retrieved in PHP. See e.g.
  • It can be set in theParserOutput usingsetDisplayTitle() orsetPageProperty().
  • It can be retrieved over the API. See e.g.

Page links

[edit]

Being able to store a custom display title does not automatically mean it is shown inpage links (e.g.[[Mypagehere]]). This is usually achieved by installing theDisplayTitle extension. If a dependency on this extension happens to be undesirable, extensions could similarly use theHtmlPageLinkRendererBegin hook.

Extensions

[edit]
Retrieved from "https://www.mediawiki.org/w/index.php?title=Display_title&oldid=7101128"
Category:

[8]ページ先頭

©2009-2025 Movatter.jp