Difference between revisions of "Template:Correct title/doc"

From blackwiki
Jump to navigation Jump to search
imported>Funplussmart
(→‎See also: added category)
imported>SD0001
(update and improve documentation)
Line 2: Line 2:
 
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
 
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
  
'''Template:Correct title''' is a [[Wikipedia:Maintenance|Wikipedia maintenance]] template that produces an article [[Wikipedia:Hatnote|hatnote]] to help explain to readers that restrictions on titles containing [[Colon (punctuation)|colons]], [[Full stop|periods]], and some other characters (noted at [[WP:TITLESPECIALCHARACTERS]]) affect the page name of the page they are reading.
+
This is a [[Wikipedia:Maintenance|Wikipedia maintenance]] template that produces an article [[Wikipedia:Hatnote|hatnote]] to help explain to readers that restrictions on titles containing [[Colon (punctuation)|colons]], [[Full stop|periods]], and some other characters (noted at [[Wikipedia:Naming conventions (technical restrictions)]]) affect the page name of the page they are reading.
 +
 
 +
The first unnamed parameter takes the correct name of the page. Do not include any [[WP:DISAMBIG|disambiguation]]-resolving terms within brackets.  
  
 
===Examples===
 
===Examples===
For issues with the ([[Number sign|#]]) sign, pass the {{para|reason|#}} parameter:
+
For issues with the ([[Number sign|#]]) sign, pass the {{para|reason|#}} parameter. If the stored page title length is 1 less than the correct title provided to the template, the wording "omission" is produced. Otherwise, the wording "substitution" is produced by default. If this is not correct for a particular page, add a <code>|edit=</code> parameter providing the correct wording.
:<code><nowiki>{{Correct title|C# (programming language)|reason=#}}</nowiki></code>
 
{{Correct title|C# (programming language)|reason=#}}
 
  
 +
:At [[Coffee 1]]:
 +
:<code><nowiki>{{Correct title|Coffee #1|reason=#}}</nowiki></code>
 +
{{Correct title|Coffee #1|reason=#}}
  
For issues with any of ([[bracket|< > [ ] { }]]), pass the {{para|reason|bracket}} parameter:
+
:At [[The No.1s]]:
 +
:<code><nowiki>{{Correct title|The #1s|reason=#}}</nowiki></code>
 +
{{Correct title|The #1s|reason=#}}
 +
 
 +
For issues with any of ([[bracket|< > [ ] { }]]), pass the {{para|reason|bracket}} parameter. If the stored page title length is 2 less than the correct title provided to the template, the wording "omission" is produced. If both titles are of same length, the wording "substitution" is produced by default. If this is not correct for a particular page, add a <code>|edit=</code> parameter providing the correct wording.
 
:<code><nowiki>{{Correct title|Benzo[a]pyrene|reason=bracket}}</nowiki></code>
 
:<code><nowiki>{{Correct title|Benzo[a]pyrene|reason=bracket}}</nowiki></code>
 
{{Correct title|Benzo[a]pyrene|reason=bracket}}
 
{{Correct title|Benzo[a]pyrene|reason=bracket}}
Line 18: Line 25:
 
:<code><nowiki>{{Correct title|DK: King of Swing|reason=:}}</nowiki></code>
 
:<code><nowiki>{{Correct title|DK: King of Swing|reason=:}}</nowiki></code>
 
{{Correct title|DK: King of Swing|reason=:}}
 
{{Correct title|DK: King of Swing|reason=:}}
 +
 +
For issues with |, pass the {{para|reason|vbar}} parameter. Use {{t|!}} instead of | while providing the correct title in the template (since | characters are not allowed in template parameters). If the stored page title length is 1 less than the correct title provided to the template, the wording "omission" is produced. Otherwise, the wording "substitution" is produced by default. If this is not correct for a particular page, add a <code>|edit=</code> parameter providing the correct wording.
 +
 +
:At [[Europa – Fira station]]:
 +
:<code><nowiki>{{Correct title|Europa {{!}} Fira station|reason=vbar}}</nowiki></code>
 +
{{Correct title|Europa {{!}} Fira station|reason=:}}
 +
 +
:At [[DE9 Transitions]]:
 +
:<code><nowiki>{{Correct title|DE9 {{!}} Transitions|reason=vbar}}</nowiki></code>
 +
{{Correct title|DE9 {{!}} Transitions|reason=:}}
  
  

Revision as of 18:41, 20 November 2018

This is a Wikipedia maintenance template that produces an article hatnote to help explain to readers that restrictions on titles containing colons, periods, and some other characters (noted at Wikipedia:Naming conventions (technical restrictions)) affect the page name of the page they are reading.

The first unnamed parameter takes the correct name of the page. Do not include any disambiguation-resolving terms within brackets.

Examples

For issues with the (#) sign, pass the |reason=# parameter. If the stored page title length is 1 less than the correct title provided to the template, the wording "omission" is produced. Otherwise, the wording "substitution" is produced by default. If this is not correct for a particular page, add a |edit= parameter providing the correct wording.

At Coffee 1:
{{Correct title|Coffee #1|reason=#}}

Template:Namespace detect

At The No.1s:
{{Correct title|The #1s|reason=#}}

Template:Namespace detect

For issues with any of (< > [ ] { }), pass the |reason=bracket parameter. If the stored page title length is 2 less than the correct title provided to the template, the wording "omission" is produced. If both titles are of same length, the wording "substitution" is produced by default. If this is not correct for a particular page, add a |edit= parameter providing the correct wording.

{{Correct title|Benzo[a]pyrene|reason=bracket}}

Template:Namespace detect


For issues with :, pass the |reason=: parameter:

{{Correct title|DK: King of Swing|reason=:}}

Template:Namespace detect

For issues with |, pass the |reason=vbar parameter. Use Template:T instead of | while providing the correct title in the template (since | characters are not allowed in template parameters). If the stored page title length is 1 less than the correct title provided to the template, the wording "omission" is produced. Otherwise, the wording "substitution" is produced by default. If this is not correct for a particular page, add a |edit= parameter providing the correct wording.

At Europa – Fira station:
{{Correct title|Europa {{!}} Fira station|reason=vbar}}

Template:Namespace detect

At DE9 Transitions:
{{Correct title|DE9 {{!}} Transitions|reason=vbar}}

Template:Namespace detect


The template can also be used without a reason, which produces:

Template:Namespace detect

See also

Template:WrongTitleExamples