Manual:ページ名

This page is a translated version of the page Manual:Page title and the translation is 31% complete.

ページ名はページの名前 (題名) です。 これはpage に格納されています。 検索ボックスから特定ページを探したり、記事の中に内部リンクとして挿入する場合、入力は名前空間 (標準名前空間の場合は名前空間なし)・コロン(標準名前空間の場合は任意)、そしてデータベースキーの順に書きます。 例えば、Manual:page テーブル はManual:名前空間にありデータベースキーはpageです。

ページ名は最初の文字を除き大文字と小文字が区別されます。 $wgCapitalLinks をfalseに設定すると、最初の文字についても大文字・小文字を区別するようになります。 しかし、ページ名を全ての文字に於いて大文字小文字の区別をなくすことは今のところ不可能です(phab:T2453)。

無効なページ名

ページ名として使うことができないのは以下のものです :

  • $wgCapitalLinks の設定に応じ、ベース名が小文字で始まる場合。 Note that a title can be displayed with an initial lower-case letter, using DISPLAYTITLE or the {{lowercase}} template. This does not fix every occurrence, like the history, edit, or log pages (phab:T55566) - or the browser address bar (phab:T63851), but only affects the page title on the rendered HTML page and tab/window title bars.
  • Titles containing the characters # < > [ ] | { } _ (which have special meanings in Wiki syntax), the non-printable ASCII characters 0–31, the "delete" character 127, or HTML character codes such as &amp;.

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 .

  • Special characters like ( ) & + are translated into their equivalent %-hex notation
  • Base names beginning with a colon (:).
  • Base names equal to "." or "..", or beginning "./" or "../", or containing "/./" or "/../", or ending "/." or "/..".

Be aware that non-ASCII characters may take up to four bytes in UTF-8 encoding, so the total number of characters you can fit into a title may be less than 255.

  • Titles containing "Talk:" in front of a namespace.
  • Titles with an invalid UTF-8 sequence.
  • Titles beginning with a namespace alias (WP:, WT:, Project:, Image:, on Wikipedia).

For example, the name Project:About is not possible if Project: is set as a namespace alias.

For example, an article about the album "Q: Are We Not Men? A: We Are Devo!" cannot have that exact name, as the "q:" prefix leads to Wikiquote. (The restriction includes the prefixes "w:" and "en:" that refer to English Wikipedia itself. This self-reference restriction does not apply on all projects. For example, Wikiquote supports titles beginning "Q:".) A list of all these interwiki prefixes can be found on Special:Interwiki.

  • Titles beginning with any non-standard capitalization of a namespace prefix, alias or interwiki/interlanguage prefix, or any of these with a space (underscore) before or after the colon.

For example, it is not possible for a title to begin such as: "HELP:", "HeLp:", "Help :", "Help:_", and the like.

  • Titles consisting of only a namespace prefix, with nothing after the colon.
  • Titles beginning or ending with a space (underscore), or containing two or more consecutive spaces (underscores).
  • Titles containing 3 or more consecutive tildes. (~~~)
  • A title can normally contain the character %.

However it cannot contain % followed by two hexadecimal digits (which would cause it to be converted to a single character, by percent-encoding).

  • Note also that it is not possible for editors to create page titles beginning with the virtual namespace prefixes Media: and Special:.

Special cases

  • By default, titles starting with a lowercase letter are automatically converted to leading uppercase.

Alternative per-namespace configurations are possible. See $wgCapitalLinks and $wgCapitalLinkOverrides.

  • The magic words PAGENAME and FULLPAGENAME return encoded strings in which some types of characters, such as apostrophes, are converted to numeric character sequences. This means that while apostrophes are perfectly valid in page names, you may encounter issues when reusing those strings for some purpose.

One simple way to fix this is wrapping the pagename in {{#titleparts:}} from the ParserFunctions extension.

Related configuration settings

関連項目