FAIR is a non-profit organization dedicated to providing well-documented answers to criticisms of the doctrine, practice, and history of The Church of Jesus Christ of Latter-day Saints.
Difference between revisions of "Help:Page name"
(→Variables PAGENAME and PAGENAMEE) |
m |
||
(2 intermediate revisions by one other user not shown) | |||
Line 12: | Line 12: | ||
:* '''+''' is used in web addresses to represent a space (e.g. when you type more than one word into some search engines). Using it in page names would potentially make parts of the system see their name wrong. Each '''+''' will be substituted by a space (in displayed titles) or an underscore (in URLs) -- see below. | :* '''+''' is used in web addresses to represent a space (e.g. when you type more than one word into some search engines). Using it in page names would potentially make parts of the system see their name wrong. Each '''+''' will be substituted by a space (in displayed titles) or an underscore (in URLs) -- see below. | ||
:* '''@''' also has a special meaning in URLs, as a way of adding a username and password, and would have even more drastic consequences. | :* '''@''' also has a special meaning in URLs, as a way of adding a username and password, and would have even more drastic consequences. | ||
− | :* '''[''', ''']''', '''{''', '''}''', '''|''', and probably some of the others have special meaning within Wikipedia's syntax, which are processed ''before'' the pagename is determined. (e.g. <nowiki>[[{{CURRENTYEAR}}]]</nowiki> points at [[{{CURRENTYEAR}}]], not a page called ''<nowiki>{{CURRENTYEAR}}</nowiki>''. | + | :* '''[''', ''']''', '''{''', '''}''', '''|''', and probably some of the others have special meaning within Wikipedia's syntax, which are processed ''before'' the pagename is determined. (e.g. <nowiki><nowiki>[[{{CURRENTYEAR}}]]</nowiki></nowiki> points at <nowiki>[[{{CURRENTYEAR}}]]</nowiki>, not a page called ''<nowiki>{{CURRENTYEAR}}</nowiki>''. |
:* '''$''', '''\''', '''"''', '''`''' (and some others) have special meaning in other bits of the software, and allowing them could create security flaws which would be difficult to track down. | :* '''$''', '''\''', '''"''', '''`''' (and some others) have special meaning in other bits of the software, and allowing them could create security flaws which would be difficult to track down. | ||
− | There are some pages that don't obey these restrictions, for example [[w:$]]. These may cause problems. | + | There are some pages that don't obey these restrictions, for example <nowiki>[[w:$]]</nowiki>. These may cause problems. |
Some very special characters, like two dots ('''¨''') over the n are not allowed either. They can only be represented using Unicode, but the English Wikipedia uses w:ISO 8859-1. | Some very special characters, like two dots ('''¨''') over the n are not allowed either. They can only be represented using Unicode, but the English Wikipedia uses w:ISO 8859-1. | ||
Line 24: | Line 24: | ||
===Namespace prefixes=== | ===Namespace prefixes=== | ||
− | Also, the first part of a page name may not coincide with [[help:Namespaces#Automatic_conversions_of_page_names|a project-independent namespace prefix that is automatically converted to another one]], e.g. the name [[w:Project: A-Kon|Project: A-Kon]] on Wikipedia is not possible. | + | Also, the first part of a page name may not coincide with <nowiki>[[help:Namespaces#Automatic_conversions_of_page_names|a project-independent namespace prefix that is automatically converted to another one]]</nowiki>, e.g. the name <nowiki>[[w:Project: A-Kon|Project: A-Kon]]</nowiki> on Wikipedia is not possible. |
− | The first part of a page name can coincide with a namespace prefix that is not converted. For example, there might be articles in the English Wikipedia about books called ''[[w:Wikipedia: The Big Adventure|Wikipedia: The Big Adventure]]'' and ''[[w:Talk: Secrets are Bad|Talk: Secrets are Bad]]'' (but only without the space after the colon). However, in that case the pages are in the wrong namespace. This may be inconvenient in searching or displaying a list of pages. Also, in the second case there is no link to a Talk page about the book. (As explained above, the second page name is not possible on e.g. the German Wikipedia. | + | The first part of a page name can coincide with a namespace prefix that is not converted. For example, there might be articles in the English Wikipedia about books called ''<nowiki>[[w:Wikipedia: The Big Adventure|Wikipedia: The Big Adventure]]</nowiki>'' and ''<nowiki>[[w:Talk: Secrets are Bad|Talk: Secrets are Bad]]</nowiki>'' (but only without the space after the colon). However, in that case the pages are in the wrong namespace. This may be inconvenient in searching or displaying a list of pages. Also, in the second case there is no link to a Talk page about the book. (As explained above, the second page name is not possible on e.g. the German Wikipedia. |
===Prefixes referring to other projects or pseudo-namespaces=== | ===Prefixes referring to other projects or pseudo-namespaces=== | ||
Line 32: | Line 32: | ||
A page name cannot start with a prefix that is in use to refer to another project, including language codes, e.g. "en:" ([http://wikimedia.org/langlist list]), or one of the pseudo-namespaces "Media:" and "Special:". | A page name cannot start with a prefix that is in use to refer to another project, including language codes, e.g. "en:" ([http://wikimedia.org/langlist list]), or one of the pseudo-namespaces "Media:" and "Special:". | ||
− | Thus e.g. an article about the album "Q: Are We Not Men? A: We Are Devo!" can not have that exact name. An attempt to create the article, whether by a link [[Q: Are We Not Men? A: We Are Devo!]] or a URL http://en.wikipedia.org/wiki/Q:Are_We_Not_Men%3F_A:_We_Are_Devo%21 leads to Wikiquote. | + | Thus e.g. an article about the album "Q: Are We Not Men? A: We Are Devo!" can not have that exact name. An attempt to create the article, whether by a link <nowiki>[[Q: Are We Not Men? A: We Are Devo!]]</nowiki> or a URL http://en.wikipedia.org/wiki/Q:Are_We_Not_Men%3F_A:_We_Are_Devo%21 leads to Wikiquote. |
− | With regard to using the prefix of the project itself there is no consistency: a name like en:a cannot be used on en: (try [[w:en:a]] and [[w:en:en:a]]), while "Q: Are We Not Men? A: We Are Devo!" can exist on Wikiquote: [[q:Q: Are We Not Men? A: We Are Devo!]]. | + | With regard to using the prefix of the project itself there is no consistency: a name like en:a cannot be used on en: (try <nowiki>[[w:en:a]]</nowiki> and <nowiki>[[w:en:en:a]]</nowiki>), while "Q: Are We Not Men? A: We Are Devo!" can exist on Wikiquote: <nowiki>[[q:Q: Are We Not Men? A: We Are Devo!]]</nowiki>. |
===Maximum page name length=== | ===Maximum page name length=== | ||
Line 51: | Line 51: | ||
===Case-sensitivity of the first character=== | ===Case-sensitivity of the first character=== | ||
− | The first character of the page name (outside the main namespace: after the namespace prefix) may or may not be case-sensitive, depending on the project. <nowiki>[[Help:page name]]</nowiki> gives on this project: [[Help:page name]]. If the first character of the page name is case-sensitive this is a link (to a different page), otherwise it is bold (a [[help:self link|self link]] to this page). | + | The first character of the page name (outside the main namespace: after the namespace prefix) may or may not be case-sensitive, depending on the project. <nowiki><nowiki>[[Help:page name]]</nowiki></nowiki> gives on this project: <nowiki>[[Help:page name]]</nowiki>. If the first character of the page name is case-sensitive this is a link (to a different page), otherwise it is bold (a <nowiki>[[help:self link|self link]]</nowiki> to this page). |
Currently the first character of the page name is case-''in''sensitive, except in the following Wiktionaries: | Currently the first character of the page name is case-''in''sensitive, except in the following Wiktionaries: | ||
Line 90: | Line 90: | ||
The canonical form is with a capital. | The canonical form is with a capital. | ||
− | Note that in the case of a prefix that is not a namespace for the software, and in the case of a second prefix, the case-insensitivity does not apply to the first character after this prefix, e.g. [[Template:H:Interwiki linking]] and [[Template:H:interwiki linking]] are distinguished. | + | Note that in the case of a prefix that is not a namespace for the software, and in the case of a second prefix, the case-insensitivity does not apply to the first character after this prefix, e.g. <nowiki>[[Template:H:Interwiki linking]]</nowiki> and <nowiki>[[Template:H:interwiki linking]]</nowiki> are distinguished. |
===Case-sensitivity of the file name extension of an image=== | ===Case-sensitivity of the file name extension of an image=== | ||
− | Note that even the file name extension of an image is case-sensitive: compare [[:image:Stop_sign_us.jpg]] and [[:image:Stop_sign_us.JPG]] | + | Note that even the file name extension of an image is case-sensitive: compare <nowiki>[[:image:Stop_sign_us.jpg]]</nowiki> and <nowiki>[[:image:Stop_sign_us.JPG]]</nowiki> |
==Ignored spaces/underscores== | ==Ignored spaces/underscores== | ||
Line 106: | Line 106: | ||
==Coding of characters== | ==Coding of characters== | ||
− | A page name can not contain e.g. %41, because that is automatically converted to the character A, for which %41 is the code. <nowiki>[[%41]]</nowiki> is rendered as [[%41]]. Similarly <nowiki>%C3%80</nowiki> is automatically converted to the character À. <nowiki>[[%C3%80]]</nowiki> is rendered as [[%C3%80]]. The URL of the page is http://meta.wikipedia.org/wiki/%C3%80. One can argue what is the real name of the page, %C3%80 or À (a user will say the latter), but anyway there can not be distinct pages with these names. | + | A page name can not contain e.g. %41, because that is automatically converted to the character A, for which %41 is the code. <nowiki><nowiki>[[%41]]</nowiki></nowiki> is rendered as <nowiki>[[%41]]</nowiki>. Similarly <nowiki>%C3%80</nowiki> is automatically converted to the character À. <nowiki><nowiki>[[%C3%80]]</nowiki></nowiki> is rendered as <nowiki>[[%C3%80]]</nowiki>. The URL of the page is http://meta.wikipedia.org/wiki/%C3%80. One can argue what is the real name of the page, %C3%80 or À (a user will say the latter), but anyway there can not be distinct pages with these names. |
==Canonical form== | ==Canonical form== | ||
− | The inclusion tag for a non-existing page shows a link with the canonical form of the page name: <nowiki>{{qwsazx}}, {{:qwsazx}}, {{project:qws azx}}</nowiki> give {{qwsazx}}, {{:qwsazx}}, {{project:qws azx}}; compare with ordinary links [[Template:qwsazx]], [[qwsazx]], [[project:qws azx]]; these work like [[piped link]]s, e.g. <nowiki>[[Qwsazx|qwsazx]]</nowiki>; in this case the conversion shows up on the referring page only when pointing at it: in the pop-up and in the status bar (if applicable for the browser); whether the target is a redirect, and what the final target is, is not shown at all. | + | The inclusion tag for a non-existing page shows a link with the canonical form of the page name: <nowiki>{{qwsazx}}, {{:qwsazx}}, {{project:qws azx}}</nowiki> give {{qwsazx}}, {{:qwsazx}}, {{project:qws azx}}; compare with ordinary links <nowiki>[[Template:qwsazx]]</nowiki>, <nowiki>[[qwsazx]]</nowiki>, <nowiki>[[project:qws azx]]</nowiki>; these work like <nowiki>[[piped link]]</nowiki>s, e.g. <nowiki><nowiki>[[Qwsazx|qwsazx]]</nowiki></nowiki>; in this case the conversion shows up on the referring page only when pointing at it: in the pop-up and in the status bar (if applicable for the browser); whether the target is a redirect, and what the final target is, is not shown at all. |
− | An attempt to include a page from another project results in just displaying the wikitext, e.g. {{en:qwsazx}}; ordinary interwiki links do not show existence and do not show a canonical form in the hover box or status bar: [[en:project:qwsazx]]. The same applies if interwiki link style is used for a link to a page in the same project: [[m:project:qwsazx]]. | + | An attempt to include a page from another project results in just displaying the wikitext, e.g. {{en:qwsazx}}; ordinary interwiki links do not show existence and do not show a canonical form in the hover box or status bar: <nowiki>[[en:project:qwsazx]]</nowiki>. The same applies if interwiki link style is used for a link to a page in the same project: <nowiki>[[m:project:qwsazx]]</nowiki>. |
A saved redirect page shows the canonical form of the target, even though the preview renders the link in the usual way, compare [http://meta.wikimedia.org/w/index.php?title=Babel&redirect=no] with the preview of [http://meta.wikimedia.org/w/index.php?title=Babel&action=edit]. | A saved redirect page shows the canonical form of the target, even though the preview renders the link in the usual way, compare [http://meta.wikimedia.org/w/index.php?title=Babel&redirect=no] with the preview of [http://meta.wikimedia.org/w/index.php?title=Babel&action=edit]. | ||
Line 118: | Line 118: | ||
==Conversion of spaces to underscores and of special characters to escape codes== | ==Conversion of spaces to underscores and of special characters to escape codes== | ||
− | There is no feature for just conversion of spaces to underscores and of special characters to escape codes, but there are two features for doing this in combination with something else: localurl (see [[Help:Variable]]) and PAGENAMEE. | + | There is no feature for just conversion of spaces to underscores and of special characters to escape codes, but there are two features for doing this in combination with something else: localurl (see <nowiki>[[Help:Variable]]</nowiki>) and PAGENAMEE. |
− | Most needs for conversion are covered by these, but e.g. in a template one cannot link to a page with a given name {{{1}}} on a project with a different [[Help:Configuration_settings_index#.24wgScript|$wgScript]]. | + | Most needs for conversion are covered by these, but e.g. in a template one cannot link to a page with a given name {{{1}}} on a project with a different <nowiki>[[Help:Configuration_settings_index#.24wgScript|$wgScript]]</nowiki>. |
=== Variables PAGENAME and PAGENAMEE === | === Variables PAGENAME and PAGENAMEE === | ||
− | [[Variable]] <nowiki>{{PAGENAME}}</nowiki> gives for this page {{PAGENAME}}, Variable <nowiki>{{PAGENAMEE}}</nowiki> gives {{PAGENAMEE}}. | + | <nowiki>[[Variable]]</nowiki> <nowiki>{{PAGENAME}}</nowiki> gives for this page {{PAGENAME}}, Variable <nowiki>{{PAGENAMEE}}</nowiki> gives {{PAGENAMEE}}. |
Thus in the first case a space is used, in the second case an underscore, like in URLs. Similarly À becomes the escape code %C3%80 (see above), etc. | Thus in the first case a space is used, in the second case an underscore, like in URLs. Similarly À becomes the escape code %C3%80 (see above), etc. | ||
Line 148: | Line 148: | ||
*<nowiki>{{SERVER}}{{localurl:Special:Allpages/{{PAGENAMEE}}|namespace=12}}</nowiki> gives here: | *<nowiki>{{SERVER}}{{localurl:Special:Allpages/{{PAGENAMEE}}|namespace=12}}</nowiki> gives here: | ||
'''{{SERVER}}{{localurl:Special:Allpages/{{PAGENAMEE}}|namespace=12}}''' (works here, the underscore, converted from a space, is not affected by the second conversion, but it does not work with special characters). | '''{{SERVER}}{{localurl:Special:Allpages/{{PAGENAMEE}}|namespace=12}}''' (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== | ==See also== | ||
− | *[[Help:Link]] gives examples of conversions in the page name from wikitext to HTML, and from HTML to actual target page. | + | *<nowiki>[[Help:Link]]</nowiki> gives examples of conversions in the page name from wikitext to HTML, and from HTML to actual target page. |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Latest revision as of 15:14, 11 May 2024
Contents
Restrictions
Special characters
The following characters are not allowed in page titles:
" # $ * + < > = @ [ ] \ ^ ` { } | ~
The reasons include:
- + is used in web addresses to represent a space (e.g. when you type more than one word into some search engines). Using it in page names would potentially make parts of the system see their name wrong. Each + will be substituted by a space (in displayed titles) or an underscore (in URLs) -- see below.
- @ also has a special meaning in URLs, as a way of adding a username and password, and would have even more drastic consequences.
- [, ], {, }, |, and probably some of the others have special meaning within Wikipedia's syntax, which are processed before the pagename is determined. (e.g. <nowiki>[[{{CURRENTYEAR}}]]</nowiki> points at [[{{CURRENTYEAR}}]], not a page called {{CURRENTYEAR}}.
- $, \, ", ` (and some others) have special meaning in other bits of the software, and allowing them could create security flaws which would be difficult to track down.
There are some pages that don't obey these restrictions, for example [[w:$]]. These may cause problems.
Some very special characters, like two dots (¨) over the n are not allowed either. They can only be represented using Unicode, but the English Wikipedia uses w:ISO 8859-1.
Forward slash (/)
Depending on the namespace and the settings a forward slash in the pagename provides special functionality.
Namespace prefixes
Also, the first part of a page name may not coincide with [[help:Namespaces#Automatic_conversions_of_page_names|a project-independent namespace prefix that is automatically converted to another one]], e.g. the name [[w:Project: A-Kon|Project: A-Kon]] on Wikipedia is not possible.
The first part of a page name can coincide with a namespace prefix that is not converted. For example, there might be articles in the English Wikipedia about books called [[w:Wikipedia: The Big Adventure|Wikipedia: The Big Adventure]] and [[w:Talk: Secrets are Bad|Talk: Secrets are Bad]] (but only without the space after the colon). However, in that case the pages are in the wrong namespace. This may be inconvenient in searching or displaying a list of pages. Also, in the second case there is no link to a Talk page about the book. (As explained above, the second page name is not possible on e.g. the German Wikipedia.
Prefixes referring to other projects or pseudo-namespaces
A page name cannot start with a prefix that is in use to refer to another project, including language codes, e.g. "en:" (list), or one of the pseudo-namespaces "Media:" and "Special:".
Thus e.g. an article about the album "Q: Are We Not Men? A: We Are Devo!" can not have that exact name. An attempt to create the article, whether by a link [[Q: Are We Not Men? A: We Are Devo!]] or a URL http://en.wikipedia.org/wiki/Q:Are_We_Not_Men%3F_A:_We_Are_Devo%21 leads to Wikiquote.
With regard to using the prefix of the project itself there is no consistency: a name like en:a cannot be used on en: (try [[w:en:a]] and [[w:en:en:a]]), while "Q: Are We Not Men? A: We Are Devo!" can exist on Wikiquote: [[q:Q: Are We Not Men? A: We Are Devo!]].
Maximum page name length
The maximum page name length is 255 bytes (excluding the namespace prefix). 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 depending on the language it's in.
Spaces vs. underscores
In page names, a blank space is equivalent with an underscore. A blank space is displayed in the large font title at the top of the page, the URLs show an underscore. See also below.
Case-sensitivity
If for the first letter of a page name two cases exist, as in the case of letters of the Latin, Greek, Cyrillic, and Armenian alphabets, the following applies.
All characters of namespace prefixes are case-insensitive. The canonical form, shown in large font as page header, and in URLs generated by the system, is with on most projects with one capital.
Case-sensitivity of the first character
The first character of the page name (outside the main namespace: after the namespace prefix) may or may not be case-sensitive, depending on the project. <nowiki>[[Help:page name]]</nowiki> gives on this project: [[Help:page name]]. If the first character of the page name is case-sensitive this is a link (to a different page), otherwise it is bold (a [[help:self link|self link]] to this page).
Currently the first character of the page name is case-insensitive, except in the following Wiktionaries:
|
|
|
|
|
Case where the first character is case-insensitive
The canonical form is with a capital.
Note that in the case of a prefix that is not a namespace for the software, and in the case of a second prefix, the case-insensitivity does not apply to the first character after this prefix, e.g. [[Template:H:Interwiki linking]] and [[Template:H:interwiki linking]] are distinguished.
Case-sensitivity of the file name extension of an image
Note that even the file name extension of an image is case-sensitive: compare [[:image:Stop_sign_us.jpg]] and [[:image:Stop_sign_us.JPG]]
Ignored spaces/underscores
Spaces/underscores which are ignored:
- those at the start and end of a full page name
- those at the end of a namespace prefix, before the colon
- those after the colon of the namespace prefix
- duplicate consecutive spaces
Coding of characters
A page name can not contain e.g. %41, because that is automatically converted to the character A, for which %41 is the code. <nowiki>[[%41]]</nowiki> is rendered as [[%41]]. Similarly %C3%80 is automatically converted to the character À. <nowiki>[[%C3%80]]</nowiki> is rendered as [[%C3%80]]. The URL of the page is http://meta.wikipedia.org/wiki/%C3%80. One can argue what is the real name of the page, %C3%80 or À (a user will say the latter), but anyway there can not be distinct pages with these names.
Canonical form
The inclusion tag for a non-existing page shows a link with the canonical form of the page name: {{qwsazx}}, {{:qwsazx}}, {{project:qws azx}} give Template:Qwsazx, Qwsazx, FAIR:Qws azx; compare with ordinary links [[Template:qwsazx]], [[qwsazx]], [[project:qws azx]]; these work like [[piped link]]s, e.g. <nowiki>[[Qwsazx|qwsazx]]</nowiki>; in this case the conversion shows up on the referring page only when pointing at it: in the pop-up and in the status bar (if applicable for the browser); whether the target is a redirect, and what the final target is, is not shown at all.
An attempt to include a page from another project results in just displaying the wikitext, e.g.
301 Moved Permanently
- ordinary interwiki links do not show existence and do not show a canonical form in the hover box or status bar
- [[en:project:qwsazx]]. The same applies if interwiki link style is used for a link to a page in the same project: [[m:project:qwsazx]].
A saved redirect page shows the canonical form of the target, even though the preview renders the link in the usual way, compare [1] with the preview of [2].
Conversion of spaces to underscores and of special characters to escape codes
There is no feature for just conversion of spaces to underscores and of special characters to escape codes, but there are two features for doing this in combination with something else: localurl (see [[Help:Variable]]) and PAGENAMEE.
Most needs for conversion are covered by these, but e.g. in a template one cannot link to a page with a given name {{{1}}} on a project with a different [[Help:Configuration_settings_index#.24wgScript|$wgScript]].
Variables PAGENAME and PAGENAMEE
[[Variable]] {{PAGENAME}} gives for this page Page name, Variable {{PAGENAMEE}} gives Page_name.
Thus in the first case a space is used, in the second case an underscore, like in URLs. Similarly À becomes the escape code %C3%80 (see above), etc.
{{NAMESPACE}}:{{PAGENAME}} and {{NAMESPACE}}:{{PAGENAMEE}} give for this page Help:Page name and Help:Page_name, respectively. For a page in the main namespace the page name is prefixed with a colon.
Example:
http://meta.wikimedia.org/w/wiki.phtml?title=Special:Whatlinkshere&target={{NAMESPACE}}:{{PAGENAMEE}}
gives
http://meta.wikimedia.org/w/wiki.phtml?title=Special:Whatlinkshere&target=Help:Page_name
Within localurl, {{PAGENAME}} should be used in the first part (because it is converted by localurl), or {{PAGENAMEE}} in the second part:
- {{SERVER}}{{localurl:Special:Allpages|namespace=12&from={{PAGENAMEE}}}} gives here:
- {{SERVER}}{{localurl:Special:Allpages/{{PAGENAME}}|namespace=12}} gives here:
https://www.fairlatterdaysaints.org/answers/index.php?title=Special:Allpages/Page_name&namespace=12
Wrong:
- {{SERVER}}{{localurl:Special:Allpages|namespace=12&from={{PAGENAME}}}} gives here:
https://www.fairlatterdaysaints.org/answers/index.php?title=Special:Allpages&namespace=12&from=Page name (wrong link)
- {{SERVER}}{{localurl:Special:Allpages/{{PAGENAMEE}}|namespace=12}} gives here:
https://www.fairlatterdaysaints.org/answers/index.php?title=Special:Allpages/Page_name&namespace=12 (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
- [[Help:Link]] gives examples of conversions in the page name from wikitext to HTML, and from HTML to actual target page.