Wikipedia:Page name

From Wikipedia, the free encyclopedia
  (Redirected from Wikipedia:DISPLAYTITLE)
Jump to: navigation, search
For information on choosing the best title for a Wikipedia article, see Wikipedia:Article titles.
For a simpler explanation of "page name" and "pagename", see Help:Page name.
Name of a Wikipedia article. The wikilink for that article is Salvo D'Acquisto, and the URL is'Acquisto.

Page name is a term that is used to refer to any page that is sent from a Wikipedia database. The page name is the title shown on the title line (the top line). The page name (the title) also conveniently serves as its link name. Page name refers to editable web pages, not the web pages that can be formed on the fly from the Virtual namespaces.

In the MediaWiki software, a page's name has aspects of itself stored in three variables that derive from the "magic words" NAMESPACE, PAGENAME, and FULLPAGENAME. Although the uppercase variables render uniquely on each page, the general terms pagename and fullpagename refer to a large set of pages making them valuable in template documentation and on talk pages (where namespace is already common). Pagename is useful in most contexts referring to article namespace, and fullpagename is concise elsewhere, for example, in how to use an administrative form.

Now "fullpagename" can mean any title, any link, any transclusion, and all successful searches for and navigations to a page. Pagename can mean the same in article space. So page name is equivalent to pagename only when the context is content ,[1] but when the context could be any page in the database, page name is equivalent to fullpagename, except for the historical revisions database, where fullpagename becomes equivalent to a permanent and unique oldid number.

Although the main page of Wikipedia has no title, the link for any page can always be made from that part of the page that is the string of characters in the URL after the last / (slash character); the link for can be [[Main page]]. The MediaWiki software will interpret all the possible URL characters correctly, such as translating the underscore to the space. (See Spaces, underscores, and character encoding below.) A title can be changed while everything else works as before, or a title can be moved, and the page name will also move. (See Changing the displayed title below.)

Namespace, pagename, and fullpagename[edit]

The page name is Help:Categories. The pagename is Categories.
Wikipedia namespaces
Subject namespaces Talk namespaces
0 (Main/Article) Talk 1
2 User User talk 3
4 Wikipedia Wikipedia talk 5
6 File File talk 7
8 MediaWiki MediaWiki talk 9
10 Template Template talk 11
12 Help Help talk 13
14 Category Category talk 15
100 Portal Portal talk 101
108 Book Book talk 109
118 Draft Draft talk 119
446 Education Program Education Program talk 447
710 TimedText TimedText talk 711
828 Module Module talk 829
2600 Topic
Virtual namespaces
-1 Special
-2 Media

The variables pagename corresponds to the concept of a basename in Unix, and serves the need for wikitext to render its own, base, page name. A "full page name" is as meaningless a term as "a page that is more fully a page", because it is the need for a namespace (in computer science) that creates the concept of a fullpagename.

On Wikipedia the namespace is heavily used because it enables two different pages with the same page name, (in different collections), to have the same subject yet serve a variable purpose. For example, this page, as it is displayed, will show that it is in the Wikipedia namespace: note the title or the URL. For example the page name Help:Categories (for the common editor), and the page name Wikipedia:Categories (for administrators) have the same pagename, Categories. So the pagename Categories is one, basic, base name, used in two namespaces.

Pagename is used where the mention of the namespace is avoidable because it is obvious. For content, the obvious namespace is "Main", so linking and searching is done with a pagename. And on article talk pages, where a reference to Help, Wikipedia, and Template namespaces often occurs, that link will be with a fullpagename, formulated [[namespace:pagename]], which is a namespace name followed by a ":" character followed by a base name.

Technically, the term pagename is valid only in reference to content, whereas typing out the two words "page name" is always valid.
A page name therefore is

  • the pagename if it is in the Main namespace.
  • the fullpagename if it is in any namespace. Fullpagename is denoted "namespace:pagename".

Note the important difference between "page name" and "pagename".

Placing the magic word {{FULLPAGENAME}} (all caps) in the wikitext will automatically render the page name of any page. In the Main namespace this will be the same as {{PAGENAME}}. In the Main namespace {{NAMESPACE}} doesn't render anything.

Problematic names[edit]

For the policy on naming pages in Wikipedia, see Wikipedia:Article titles.

It may be desired to create an encyclopedia article whose title happens to begin with one of the standard namespace prefixes, followed by a colon, such as Wikipedia: The Big Adventure or Talk: Secrets are Bad. (The ":" character is not part of a namespace name.) This is technically possible, however the article would be in the wrong namespace, which would interfere with Search and other functionality, and that space after the colon would have to be added with DISPLAYTITLE as described below. In such situations the naming guideline recommends redirecting to an alternative title within mainspace.

A forward slash ( / ) in the pagename provides special functionality in a namespace where the subpage feature has been enabled. This feature is not active in Wikipedia's main namespace, so a forward slash in an article name has no particular effect (although it may affect the behaviour of the corresponding talk page, as subpages are enabled in talk space).

Technical restrictions and limitations[edit]

For information on how to treat pages whose titles are affected by these limitations, see Wikipedia:Naming conventions (technical restrictions).

In general, a page name can be any string of one or more Unicode characters. However, some strings of Unicode characters cause technical problems with the way Wikipedia functions, and so are limited or restricted.[2] These limitations and restrictions include:

  • A pagename cannot begin with a lowercase letter (in any alphabet).[3]
  • A pagename cannot contain any of the following characters: # < > [ ] | { } _ (which have special meanings in Wiki syntax), the non-printable ASCII characters 0–31 (dec), the delete character 127, the Unicode replacement character U+FFFD (�), or HTML character codes such as &amp;.[4] A pagename also cannot contain 3 or more continuous tildes (~~~), as these are used for marking signatures on Wikipedia.
  • A pagename cannot begin with a colon (:).
  • A pagename cannot be "." or "..", or begin with "./" or "../", or contain "/./" or "/../", or end with "/." or "/..".
  • A pagename cannot exceed 255 bytes in length. Be aware that non-ASCII characters may take up to four bytes in UTF-8 encoding, so the total number of characters that can fit into a title may be less than 255.
  • A pagename cannot begin with any kind of namespace prefix,[5] including subject and talk namespace prefixes, namespace aliases (e.g. WT:), virtual namespace prefixes (Special:, Media:), interwiki prefixes (e.g. Wikt:, Q:), and interlanguage prefixes (Fr:, En:, etc.). For example, an article about the album Q: Are We Not Men? A: We Are Devo! cannot have that pagename, because of the "q:". Furthermore, no capitalization of a namespace name, and no space (underscore) before or after the colon of a namespace name. For example, not "HELP:", "HeLp:", "Help :" or "Help:_". Finally, it cannot consist only of a namespace prefix.
  • A pagename cannot begin or end with a space or underscore.

A pagename can have the character %, but it must be percent-encoded as %25 in the URL, to prevent it from being interpreted as a single character. To prevent ambiguity, page names cannot contain % followed by 2 hexadecimal digits.

Changing the displayed title[edit]

For more information, see Template:DISPLAYTITLE.

It is possible to change the way a page title is displayed at the top of its page. This should only be done if the article meets the criteria for a non-standard title format, as detailed in the Article titles policy. The displayed title format is changed using the magic word DISPLAYTITLE. Under the present software configuration, only limited modifications can be made: the displayed title must still resolve to the true name of the page (i.e. if the displayed title is copied and pasted into a wikilink, the link should point to the original page). DISPLAYTITLE allows many formats: changing an initial letter to lower case, adding initial colons, changing spaces to underscores, adding a space after a namespace prefix, and adding formatting (italics, bolding, superscripts, subscripts, etc.). The forbidden characters are not supported by DISPLAYTITLE.

The syntax for DISPLAYTITLE is {{DISPLAYTITLE:Desired Title}}. However it is often applied through a template. Currently available templates are {{lowercase title}}, used on such articles as eBay and iPod, and {{italic title}}, commonly used for scientific names. Both of these templates will work irrespective of where they are placed in the wikitext, but it is normal to place them at the beginning. There are also some infoboxes (such as {{Infobox film}}) which include a built-in DISPLAYTITLE to italicize the page title.

If there is more than one instance of DISPLAYTITLE and they do not all specify the same title, only the last instance is enacted with an error message generated. For example:

Warning: Display title "<i>Desired title</i>" overrides earlier display title "<i>Desired</i> title".

The preferred solution to this problem is to remove or disable one of the instances of DISPLAYTITLE. If this is not possible due to template limitations, etc., then the error message may be suppressed by using the "noerror" parameter, i.e. {{DISPLAYTITLE:Desired Title|noerror}}. If you use this technique, you should be aware that the last instance of DISPLAYTITLE overrides the previous ones. This means that if the DISPLAYTITLE automatically generated by an infobox template needs to be overridden, then an explicit DISPLAYTITLE must be placed after the infobox to make it work.

Alphabetical order[edit]

Where page titles are placed in alphabetical order by the system (as at Special:AllPages), Unicode-based ordering is used rather than the truly alphabetical ordering that would be expected. For details, see Help:Alphabetical order.

Spaces, underscores and character coding[edit]

In page names, a blank space is equivalent to an underscore. A blank space is displayed in the large font title at the top of the page, while the URLs show an underscore. Wikilinks can use either spaces or underscores (spaces are preferred in article space).

Character codes, such as %41 (which codes "A") and %C3%80 (which codes "À"), are treated in pagenames as equivalent to their corresponding characters. The codes are generally used for most non-alphanumeric and non-ASCII characters in URLs (although the characters themselves may sometimes work as well, depending on browser).

Codes are converted into corresponding characters in link labels: [[%41]] and %C3%80 are rendered as A and À. The URL of the latter page is It can be disputed whether the "real" name of the page is %C3%80 or À, but in any case there cannot be distinct pages with these names.

In some cases (such as in templates), it is necessary to convert a page name represented by a variable into a form suitable for use in URLs: with underscores for spaces and with % codes for special characters. This can be done using the magic words described below (for full details, see mw:Help:Magic words).

  • Certain variables ending with an extra "E" (PAGENAMEE, NAMESPACEE, etc.) return URL-encoded forms. For example, for this page, {{FULLPAGENAMEE}} gives Wikipedia:Page_name.
  • The localurl and fullurl functions can be used to generate relative and full URLs to a particular page. Fullurl can also be used for interwiki references (but may not work for links to pages on a project with a different $wgScript).

If pagename variables are used within the localurl/fullurl functions, then use standard variables ({{PAGENAME}} etc.) in the first parameter (where they will be encoded anyway), but the "EE" variables ({{PAGENAMEE}} etc.) in the second parameter (the query string), if present. For example:

  • {{fullurl:Special:Allpages|namespace=12&from={{PAGENAMEE}}}} gives here:


  • {{fullurl:Special:Allpages/{{PAGENAME}}|namespace=12}} gives here:



  • {{fullurl:Special:Allpages|namespace=12&from={{PAGENAME}}}} gives here:

// name (wrong link)

  • {{fullurl:Special:Allpages/{{PAGENAMEE}}|namespace=12}} gives here:

// (works here, the underscore, converted from a space, is not affected by the second conversion, but it does not work with special characters).

See also[edit]


  1. ^ Per WikiMedia, (thus Wikipedia), "content" means it is in article namespace.
  2. ^ Pagename naming is different on other projects.
  3. ^ This is not true in all projects; for example, Wiktionary allows initial lower-case letters. This setting is configured using $wgCapitalLinks. Note that a title can be displayed with an initial lower-case letter, using DISPLAYTITLE or the {{lowercase title}} template.
  4. ^ Note that the plus sign + is allowed in page titles, although in the default setup for MediaWiki it is not. This is configured by setting the value of $wgLegalTitleChars in LocalSettings.php.
  5. ^ except a Pseudo-namespace name, by definition.