Jump to content

විකිපීඩියා:Page name

විකිපීඩියා වෙතින්
(විකිපීඩියා:PNAME වෙතින් යළි-යොමු කරන ලදි)
Name of a Wikipedia article. The wikilink for that article is Salvo D'Acquisto, and the URL is https://en.wikipedia.org/wiki/Salvo_D'Acquisto

Page name is a term that is used to refer to any page that is sent from a Wikipedia database. It does not usually refer to virtual namespaces, like Special or Media pages. The page name is normally the same as the displayed title, shown on the title line, near the top of the page, in a large font size. The displayed title can, however, be altered slightly from the page name without affecting things much; see Changing the displayed title below.

Page names are used to title pages, to navigate to pages, to search for pages, and for things like transclusion and substitution. Page names also conveniently serves as link names in wikitext, if enclosed in double square brackets, like [[Page name]]. If a page is moved, the page name will also move.

Page names are also the same as the last part of the URL of Wikipedia pages, that is, after the last slash (/); except that some translation occurs, such as spaces are replaced with underscores. For example, the Main page of Wikipedia has no title, but a link can be formed from the last part of the URL, such as [[Main_Page]] or [[Main Page]]. The MediaWiki software, which drives Wikipedia, will interpret all the possible URL characters correctly; see Spaces, underscores, and character encoding below. But with pages in the revision history database, URLs are different, and only the full URL can be linked; the URL includes the page name, but also an oldid value, in the permanent and unique form Page_name&oldid=value. See Help:Page history for more details.

The MediaWiki software set in motion the terminology of page names when they stored aspects of the page name in three "magic words": {{NAMESPACE}}, {{PAGENAME}}, and {{FULLPAGENAME}}. We now write that a fullpagename is "namespace:pagename" to refer to those aspects of a page name. Their content management uses namespaces, and it embeds the namespace name in the title for each page except for the main content, for which the namespace aspect is hidden. Wikipedia articles have no namespace because they are the main purpose.[1] In Wikipedia, then an article's page name has a fullpagename of pagename, but outside the main namespace, the MediaWiki titles don't hide the namespace name, so there the page name (or fullpagename) show as namespace:pagename with a colon between. This makes a few restrictions on pagenames, which we fully cover.

Namespace, pagename, and fullpagename

[සංස්කරණය]

The page name is Help:Categories. The pagename is Categories.

The terminology for referencing pages is set by the MediaWiki software, where three variables name every page: pagename, namespace, and fullpagename.[2] Note that "pagename" (without a space in the middle), has a different meaning than "page name"

A title is a "page name" and, always as well, a "fullpagename". Both terms are equally synonymous with title. Because a namespace is just a way of categorizing the functional purpose (or type) of a set of pages, it could be argued that the pagename is the title proper, and in the most important case it is: for articles, a "page name" is a "pagename". This is made true by having the default namespace (when no namespace is given) be article space (or mainspace), so that for an article fullpagename is just pagename.

The analogy to common, everyday computing is the following. 1) the search box is the command line interface of a terminal. 2) Article namespace is always the current working directory. 3) Each namespace is one directory below. This way an article title is always a simple basename, and a namespace:pagename is a dirname/basename. The two exceptions are that 1) Special pages are not in the database (or "on the disk"), so their title does not follow the scheme: special pages show no namespace like all other titles do, and 2) wrapping a pagename in double curly braces switches to the Template namespace (or directory) as the default.

Navigating from the search box requires a fullpagename, for example the Potato article is potato, and the Potato template is Template:Potato.

The article namespaces needs no name normally, but, for advancing users, the name of article space is : (a colon), found in these common uses:

  • In the search box (for users who reset their default search domain):
    • : query indicates a query in article space only, just as  Template: query  indicates the Template namespace.
    • as the first character in the argument to the prefix: parameter: prefix:: (compare prefix:Template:)
  • On a page in the wikitext:
    • {{:pagename}} to transclude a page from article space
    • {{subst::pagename}} to substitute a page from article space

A given namespace is required to name (or reference) a page on Wikipedia that is not in article space, because the wiki can have the same pagename in many different namespaces, for example Help:Category and Wikipedia:Category. The Wikipedia term namespace derives from the computer science concept of namespace. It can be thought as specifying a collection of pages serving a functional purpose, such as templates, or MediaWiki software messages, with each individual page specified by a pagename that is unique for that collection.

A fullpagename is a namespace:pagename: a namespace name followed by a colon, then a pagename.

  • In article space a fullpagename is a pagename. (The namespace part defaults to article space.)
  • In all other namespaces a fullpagename is a namespace:pagename.
  • Fullpagename, page name, and the page's displayed title are always the same letters (keys on the keyboard). (Except see DISPLAYTITLE below
  • In a URLs it is the fullpagename that is encoded.
  • In the revision history database the same fullpagename is commensurate with all the oldid number.

For more helpful examples:

  • Wikipedia:Disambiguation and Help:Disambiguation:
    • The page name and fullpagename Wikipedia:Disambiguation, has Wikipedia as namespace, and Disambiguation as pagename.
    • The page name and fullpagename Help:Disambiguation, has Help as namespace, and Disambiguation as pagename.
  • Copyright and Help:Copyright
    • The page Help:Copyright has Help:Copyright as page name and fullpagename; Help as namespace; and Copyright as pagename.

Terminology is an organization's way to communicate quickly. The terms "fullpagename" and "pagename" in italics specify the variable type, for example:

  • The statements: "Writing {{Template:pagename}} is redundant. Why use {{fullpagename}}, when {{pagename}} will suffice?"
  • The instructions: "Add a level 3 header (i.e. === [[Example title]] ===) with the namespace if not an article."[3]
could be written more succinctly
"Add === [[fullpagename]] ==="
  • Documenting template parameters that take a namespaces and a series of different pagenames:
namespace | pagename | pagename ... | pagename
  • Or if it cannot be made clear, then resort to numbering:
fullpagename1 | fullpagename2 ... | fullpagenameN.

For more examples of these lowercased terms in template documentation see the searches template: fullpagename and template: pagename.


Subpagename and basepagename

[සංස්කරණය]

The terminology for referencing a subpage (and its parent page) is suggested by the MediaWiki software's {{SUBPAGENAME}} (and {{BASEPAGENAME}}). These can be a clear and concise way to talk about subpages. See where subpagename or basepagename are used on pages.

Subpagenames and subpage links are used to abbreviate linking and transclusion among closely interworking subpages, where they are seen near the top of every subpage in the nav list, and in [[wikilinks]], and in {{templates}}.

Navigating or linking to any page requires [[fullpagename]] except when to and from subpages. For example, at Manual of Style (subpages) or at Help: Wikipedia: The Missing Manual (subpages). The construct ../ is an abbreviation borrowed from computing, and using it in a wikilink renders the fullpagename.

The table below shows a live demo of subpage naming relations, and subpage linking.
See this table on subpages /one/two/three/four and /sub/page/name1/sub/page/name2/subpage level 3.

සැකිල්ල:Subpage help

It shows that

  • A subpagename is just a label inside its pagename, with a software-added / slash delimiter.
  • The basepagename is just the pagename of the parent, so it absorbs child subpagenames.
  • A fullpagename is a namespace:basepagename/subpagename, or a ../subpagename.
  • The pagename includes the subpagename. There really is a sub-pagename, (although there is no full-pagename or full pagename).
  • The pagename of a subpage is basename/subpagename.
  • Basepagename only lacks the namespace needed for linking or navigating.
  • When not on a subpage:
    • the terms are synonymous: pagename, subpagename, basepagename.
    • [[../]] renders [[../]], [[../../]], etc.
  • When the subpagename has a / slash character in it, a subpage link to it [[../]] renders a red-linked fullpagename.

Other facts concerning subpages are that

  • A wikilink [[/subpagename]] can create a subpage.
  • While editing a subpage you don't see subpagenames to know for sure how to reference parent pages in subpage links. You only a have view of the title.
  • The subpage navigation list only shows subpages above. You can list subpages below
    • indirectly from the "Page information" item on every page.
    • directly from a "Subpages" item on every page, by adding a bit of JavaScript to your මනාප.
    • indirectly using Search with the prefix parameter.

You can find standardized subpagenames by using the intitle parameter. See common subpagenames from these searches:

Each pagename in a namespaces is unique, but those searches show how subpagenames are standardized, and repeated many times.

Titles in the Special and Media namespaces

[සංස්කරණය]

In the two virtual namespaces  — Special and Media  — the title line of the page is not the fullpagename.

Even with irregular titles, virtual pages are readily navigated, linked, and transcluded using namespace:pagename.

  • The title line of a Media page is File:pagename. (This title is only helpful in some cases.)
  • A Special page follows no such rules. Its title displays no namespace, and can change its pagename. See for example the title of any page listed at Special:SpecialPages.

A virtual page is not a page name stored in the database as wikitext.

  • Special pages are automatically generated in HTML.
  • Media pages are stored as binary data at the Wikimedia Commons wiki.

Additionally, for page naming Special pages:

  • The URL of a Special page can differ from normal Wikipedia:URLs, especially when it involves several operating parameters.
  • Their fullpagename can be {{transcluded}}, but only in some cases.
  • Searching for Special pages is not possible, although suggestions are given from the search box, and when you type special: followed by anything not a pagename, you get a link to Special pages.

Magic words and page name

[සංස්කරණය]

As explained earlier, the fullpagename, pagename and namespace of a page can be rendered by placing the 'magic words' {{FULLPAGENAME}}, {{PAGENAME}} and {{NAMESPACE}} in the wikitext. These three magic words must be in all capitals. These and related magic words also have parsing abilities, see meta:Help:Page name for more information on this.

FULLPAGENAME, fullpagename and page name

[සංස්කරණය]

The magic word {{FULLPAGENAME}} renders the fullpagename of a page if inserted in the wikitext of a page. Now the fullpagename of a page will generally be the same as the page name (note the space in page name), and hence the page's title as explained earlier. The only time the fullpagename will differ from the page's title, is if the displayed title is changed by a method detailed in the 'Changing the displayed title' section beneath; for example, by using the magic word {{DISPLAYTITLE:title}}.

PAGENAME and pagename

[සංස්කරණය]

The magic word {{PAGENAME}} renders the pagename (note there is no space in pagename) of a page if inserted in the wikitext of a page. As explained earlier, the fullpagename will be the same as pagename only if the page is in Main namespace (e.g. for encyclopedic articles); in other namespaces, fullpagename will be the same as 'namespace:pagename'.

NAMESPACE and namespace

[සංස්කරණය]

The magic word {{NAMESPACE}} usually renders the namespace of a page if inserted in the wikitext of a page. The only time this doesn't happen is in Main namespace, where {{NAMESPACE}} will render a blank instead.

Subpages (except for article pages) are also rendered by these magic words. For example, for the page named Wikipedia:Userboxes/Media/Film, fullpagename would be Wikipedia:Userboxes/Media/Film, pagename would be Userboxes/Media/Film, and namespace would be Wikipedia.

As an example, for the article Notability: the page name, {{FULLPAGENAME}} and {{PAGENAME}} would be Notability; and {{NAMESPACE}} would be blank. And for the page Wikipedia:Notability: the page name and {{FULLPAGENAME}} would be Wikipedia:Notability; {{NAMESPACE}} would be Wikipedia; and {{PAGENAME}} would be Notability.

[සංස්කරණය]

Adding an E to the end of these variables, like {{FULLPAGENAMEE}}, renders these variables encoded for use in MediaWiki URLs, i.e. with underscores replacing any spaces. Additional magic words for related variables include {{ARTICLEPAGENAME}}, {{ARTICLESPACE}}, {{BASEPAGENAME}}, {{SUBJECTPAGENAME}}, {{SUBJECTSPACE}}, {{SUBPAGENAME}}, {{TALKPAGENAME}}, {{TALKSPACE}}. See Help:Magic words for more details.

Technical restrictions and limitations

[සංස්කරණය]

Wikipedia:Article titles describes the policy for the correct naming of an article, but there are also technical restrictions to the naming of articles on Wikipedia, most of which are listed at Wikipedia:Naming conventions (technical restrictions). The section Changing the displayed title explains how a technical restriction may sometimes be overcome.

Forward slash (/) in page names 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; but it may affect the behaviour of the corresponding talk page, as subpages are enabled in the Main Talk namespace. An example is the article GNU/Linux naming controversy; it doesn't have a subpage, but the talk page Talk:GNU/Linux naming controversy is a subpage of Talk:GNU. But this doesn't particularly cause problems.

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.[4] Note that these rules mostly apply to namespace as well as pagename. These limitations and restrictions include:

  • A page name cannot begin with a lowercase letter in any alphabet, except for the German letter ß.[5]
  • A page name cannot contain any of the following characters: # < > [ ] | { } _ (which all have special meanings in wiki syntax); the non-printable ASCII characters (coded 0–31 decimal); the delete character (coded 127 decimal); the Unicode replacement character U+FFFD ; or any HTML character codes, such as &amp;.[6] 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, except a pseudo-namespace prefix, by definition.

Namespace prefixes include: all subject and talk namespace prefixes (e.g., Wikipedia: and User:). Virtual namespace prefixes (Special: and Media:). Namespace aliases (e.g., WT:). Interwiki linking prefixes (e.g. Wikt: for Wiktionary; Q: for Wikiquote). Interlanguage link prefixes (e.g. fr:, en:). For example, an article about the album Q: Are We Not Men? A: We Are Devo! has the pagename Q. Are We Not Men? A: We Are Devo! because of the Q:.

Article titles beginning with a namespace prefix (e.g. Wikipedia: The big adventure) are 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 conventions recommend redirecting to an alternative title within mainspace. For example, the article Project: Mersh is named Project Mersh, as Project: is a namespace alias for the Wikipedia: namespace.

  • A pagename cannot consist of only a namespace prefix.
  • A pagename cannot begin or end with a space (which would be translated to an underscore in the URL).
  • A pagename cannot contain % followed by 2 hexadecimal digits.

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, pagenames cannot contain % followed by 2 hexadecimal digits.

  • With namespaces, no capitalization of a namespace name, apart from the first letter, is allowed. Also, no spaces (which are translated to underscores) are allowed before or after the colon of a namespace name. For example, the following are not allowed: HELP:, HeLp:, Help_: or Help:_ (with spaces rather than underscores).

Changing the displayed title

[සංස්කරණය]

Although it is not possible to change a page title via the magic word DISPLAYTITLE, it is possible to stylize the way a page title is displayed at the top of its page. This should be done only if the article meets the criteria for a non-standard title format, as detailed in the Article titles policy. Unlike on a few other wikis, $wgRestrictDisplayTitle is true here, so 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 changing an initial letter to lower case; adding initial colons; changing spaces to underscores; adding a space after a namespace prefix; and adding formatting such as italics, bolding, superscripts, subscripts, etc. Forbidden characters are not supported by DISPLAYTITLE. Since 2013 it is not possible to hide part of the title with <span style="display:none;">...</span>.

The syntax for DISPLAYTITLE is {{DISPLAYTITLE:Desired title}}. However it is often applied through a template, which includes {{lowercase title}} (used on such articles as eBay and iPod, and on categories such as Category:macOS), {{lowercase}} (used on templates such as Template:iPhone models) and {{italic title}} (commonly used for scientific names). Some infoboxes (such as {{Infobox film}}) include a built-in DISPLAYTITLE to automatically italicize the page title.

If there is more than one instance of DISPLAYTITLE with allowed modifications, and they do not all specify the same title, only the last such 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 one of the instances of DISPLAYTITLE. While it is possible to suppress the error via the "noerror" parameter, i.e. {{DISPLAYTITLE:Desired title|noerror}}, it is preferable to tweak the template that automatically includes the conflicting DISPLAYTITLE via parameter(s) usually described in its documentation. Many infoboxes have the option |italic title = no or |italic_title = no to omit an automatic display title.

A DISPLAYTITLE is applied when previewing in the wikitext editor. Please test it before saving. A DISPLAYTITLE with disallowed modifications produces a warning in preview. It will not prevent a previous DISPLAYTITLE with allowed modifications from working. When using the VisualEditor, the DISPLAYTITLE is not applied in the preview, nor are warnings given.

See Wikipedia:Moving a page if you want to change the actual title of the page.

Parameters for DISPLAYTITLE should be passed using a colon (:) rather than a vertical bar (|): {{DISPLAYTITLE:Desired title}} is preferred to {{DISPLAYTITLE|Desired title}}. The reason for this is that it then bypasses the Template:DISPLAYTITLE completely, to access the magic word directly.

Draft articles

The normal usage of {{DISPLAYTITLE:Draft:'''Example''' (film)}} will appear to work but it will stop working when the draft is accepted since the new page name will be Example (film) instead of Draft:Example (film).

The preferred way is to use templates (see above). If that is not practical, {{DISPLAYTITLE:{{NAMESPACE}}:Character (''Booktitle'')}} works and will continue to work if the page is moved into the main encyclopedia.

Alphabetical order

[සංස්කරණය]

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 encoding

[සංස්කරණය]

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).

Percent-encoded character codes, such as %41 (which codes A) and %C3%80 (which codes À or A-grave), 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. The reason why %C3%80 works is because the UTF-8 for A-grave is C380 hex.

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 https://en.wikipedia.org/wiki/%C3%80 or https://en.wikipedia.org/wiki/À. 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 magic words ending with an extra "E", such as PAGENAMEE, NAMESPACEE, etc., return URL-encoded page names. For example, for this page, {{FULLPAGENAMEE}} gives %E0%B7%80%E0%B7%92%E0%B6%9A%E0%B7%92%E0%B6%B4%E0%B7%93%E0%B6%A9%E0%B7%92%E0%B6%BA%E0%B7%8F: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 or fullurl functions, then use standard variables like {{PAGENAME}} etc., in the first parameter, where they will be encoded anyway; but then use "EE" variables, like {{PAGENAMEE}} etc., in the second parameter, the query string, if present. For example:

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

//si.wikipedia.org/w/index.php?title=%E0%B7%80%E0%B7%92%E0%B7%81%E0%B7%9A%E0%B7%82:Allpages&namespace=12&from=Page_name

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

//si.wikipedia.org/w/index.php?title=%E0%B7%80%E0%B7%92%E0%B7%81%E0%B7%9A%E0%B7%82:Allpages/Page_name&namespace=12

It is wrong to use:

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

//si.wikipedia.org/w/index.php?title=%E0%B7%80%E0%B7%92%E0%B7%81%E0%B7%9A%E0%B7%82:Allpages&namespace=12&from=Page name, which is the wrong link.

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

//si.wikipedia.org/w/index.php?title=%E0%B7%80%E0%B7%92%E0%B7%81%E0%B7%9A%E0%B7%82:Allpages/Page_name&namespace=12 . It works here, as the underscore, converted from a space, is not affected by the second conversion; but it does not work with special characters.

  1. ^ Per Special:Statistics community pages (operations and maintenance) outnumber "main" pages seven to one.
  2. ^ The variables are activated (filled in) by putting them in ALL CAPS in double curly braces. For example, at WP:SAND:
    The title of this page, {{FULLPAGENAME}}, is a namespace, {{NAMESPACE}}, plus a pagename, {{PAGENAME}}. shows:
    The title of this page, Wikipedia:Sandbox, is a namespace, Wikipedia, plus a pagename, Sandbox.
  3. ^ Wikipedia:Requests for page protection
  4. ^ Page name naming is different on other projects.
  5. ^ This is not true in all projects; for example, Wiktionary allows initial lower-case letters. This setting is configured using $wgCapitalLinks. A title can be displayed with an initial lower-case letter, when needed, by using DISPLAYTITLE, or the {{lowercase title}} template.
  6. ^ 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.
"https://si.wikipedia.org/w/index.php?title=විකිපීඩියා:Page_name&oldid=557798" වෙතින් සම්ප්‍රවේශනය කෙරිණි