(This site is at a very early stage, so lots of missing stuff! See Joystick_Directory:About for more.)

Correct title/doc

From Joystick Directory
< Template:Correct title
Revision as of 10:08, 2 May 2023 by Jdadmin (talk | contribs) (Created page with "{{Documentation subpage}} <!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --> 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...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Template:Documentation subpage

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 Template:Para 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:Selfref{{#if:Template{{#iferror:{{#invoke:Page|interwiki|{{#invoke:String|replace|Coffee #1|'|}}}}{{#invoke:Page|fragment|Coffee #1a}}{{#ifeq:{{#invoke:Page|isContentPage|{{#invoke:String|replace|Coffee #1|'|}}}}|true||a}}|a}}||}}Template:Namespace detect

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

Template:Selfref{{#if:Template{{#iferror:{{#invoke:Page|interwiki|{{#invoke:String|replace|The #1s|'|}}}}{{#invoke:Page|fragment|The #1sa}}{{#ifeq:{{#invoke:Page|isContentPage|{{#invoke:String|replace|The #1s|'|}}}}|true||a}}|a}}||}}Template:Namespace detect

For issues with any of (< > [ ] { }), pass the Template:Para 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.

At Benzo(a)pyrene:
{{Correct title|Benzo[''a'']pyrene|reason=bracket}}

Template:Selfref{{#if:Template{{#iferror:{{#invoke:Page|interwiki|{{#invoke:String|replace|Benzo[a]pyrene|'|}}}}{{#invoke:Page|fragment|Benzo[a]pyrenea}}{{#ifeq:{{#invoke:Page|isContentPage|{{#invoke:String|replace|Benzo[a]pyrene|'|}}}}|true||a}}|a}}||}}Template:Namespace detect

At (an imitation) blood orange:
{{Correct title|''[(an imitation)] blood orange''|reason=bracket}}

Template:Selfref{{#if:Template{{#iferror:{{#invoke:Page|interwiki|{{#invoke:String|replace|[(an imitation)] blood orange|'|}}}}{{#invoke:Page|fragment|[(an imitation)] blood orangea}}{{#ifeq:{{#invoke:Page|isContentPage|{{#invoke:String|replace|[(an imitation)] blood orange|'|}}}}|true||a}}|a}}||}}Template:Namespace detect

For issues with :, pass the Template:Para parameter:

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

Template:Selfref{{#if:Template{{#iferror:{{#invoke:Page|interwiki|{{#invoke:String|replace|DK: King of Swing|'|}}}}{{#invoke:Page|fragment|DK: King of Swinga}}{{#ifeq:{{#invoke:Page|isContentPage|{{#invoke:String|replace|DK: King of Swing|'|}}}}|true||a}}|a}}||}}Template:Namespace detect

For issues with |, pass the Template:Para 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:Selfref{{#if:Template{{#iferror:{{#invoke:Page|interwiki|{{#invoke:String|replace|Europa | Fira station|'|}}}}{{#invoke:Page|fragment|Europa | Fira stationa}}{{#ifeq:{{#invoke:Page|isContentPage|{{#invoke:String|replace|Europa | Fira station|'|}}}}|true||a}}|a}}||}}Template:Namespace detect

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

Template:Selfref{{#if:Template{{#iferror:{{#invoke:Page|interwiki|{{#invoke:String|replace|DE9 | Transitions|'|}}}}{{#invoke:Page|fragment|DE9 | Transitionsa}}{{#ifeq:{{#invoke:Page|isContentPage|{{#invoke:String|replace|DE9 | Transitions|'|}}}}|true||a}}|a}}||}}Template:Namespace detect

For titles exceeding the 256 character length limit, pass the Template:Para parameter.

At The Boy Bands Have Won:
{{correct title|The Boy Bands Have Won, and All the Copyists and the Tribute Bands and the TV Talent Show Producers Have Won, If We Allow Our Culture to Be Shaped by Mimicry, Whether from Lack of Ideas or from Exaggerated Respect. You Should Never Try to Freeze Culture. What You Can Do Is Recycle That Culture. Take Your Older Brother's Hand-Me-Down Jacket and Re-Style It, Re-Fashion It to the Point Where It Becomes Your Own. But Don't Just Regurgitate Creative History, or Hold Art and Music and Literature as Fixed, Untouchable and Kept Under Glass. The People Who Try to 'Guard' Any Particular Form of Music Are, Like the Copyists and Manufactured Bands, Doing It the Worst Disservice, Because the Only Thing That You Can Do to Music That Will Damage It Is Not Change It, Not Make It Your Own. Because Then It Dies, Then It's Over, Then It's Done, and the Boy Bands Have Won.|reason=length}}

Template:Selfref{{#if:Template{{#iferror:{{#invoke:Page|interwiki|{{#invoke:String|replace|The Boy Bands Have Won, and All the Copyists and the Tribute Bands and the TV Talent Show Producers Have Won, If We Allow Our Culture to Be Shaped by Mimicry, Whether from Lack of Ideas or from Exaggerated Respect. You Should Never Try to Freeze Culture. What You Can Do Is Recycle That Culture. Take Your Older Brother's Hand-Me-Down Jacket and Re-Style It, Re-Fashion It to the Point Where It Becomes Your Own. But Don't Just Regurgitate Creative History, or Hold Art and Music and Literature as Fixed, Untouchable and Kept Under Glass. The People Who Try to 'Guard' Any Particular Form of Music Are, Like the Copyists and Manufactured Bands, Doing It the Worst Disservice, Because the Only Thing That You Can Do to Music That Will Damage It Is Not Change It, Not Make It Your Own. Because Then It Dies, Then It's Over, Then It's Done, and the Boy Bands Have Won.|'|}}}}{{#invoke:Page|fragment|The Boy Bands Have Won, and All the Copyists and the Tribute Bands and the TV Talent Show Producers Have Won, If We Allow Our Culture to Be Shaped by Mimicry, Whether from Lack of Ideas or from Exaggerated Respect. You Should Never Try to Freeze Culture. What You Can Do Is Recycle That Culture. Take Your Older Brother's Hand-Me-Down Jacket and Re-Style It, Re-Fashion It to the Point Where It Becomes Your Own. But Don't Just Regurgitate Creative History, or Hold Art and Music and Literature as Fixed, Untouchable and Kept Under Glass. The People Who Try to 'Guard' Any Particular Form of Music Are, Like the Copyists and Manufactured Bands, Doing It the Worst Disservice, Because the Only Thing That You Can Do to Music That Will Damage It Is Not Change It, Not Make It Your Own. Because Then It Dies, Then It's Over, Then It's Done, and the Boy Bands Have Won.a}}{{#ifeq:{{#invoke:Page|isContentPage|{{#invoke:String|replace|The Boy Bands Have Won, and All the Copyists and the Tribute Bands and the TV Talent Show Producers Have Won, If We Allow Our Culture to Be Shaped by Mimicry, Whether from Lack of Ideas or from Exaggerated Respect. You Should Never Try to Freeze Culture. What You Can Do Is Recycle That Culture. Take Your Older Brother's Hand-Me-Down Jacket and Re-Style It, Re-Fashion It to the Point Where It Becomes Your Own. But Don't Just Regurgitate Creative History, or Hold Art and Music and Literature as Fixed, Untouchable and Kept Under Glass. The People Who Try to 'Guard' Any Particular Form of Music Are, Like the Copyists and Manufactured Bands, Doing It the Worst Disservice, Because the Only Thing That You Can Do to Music That Will Damage It Is Not Change It, Not Make It Your Own. Because Then It Dies, Then It's Over, Then It's Done, and the Boy Bands Have Won.|'|}}}}|true||a}}|a}}||}}Template:Namespace detect

The template can also be used without a reason. For example, at Robot Face:

{{Correct title|<{{!}}°_°{{!}}>}}

Template:Selfref{{#if:Template{{#iferror:{{#invoke:Page|interwiki|{{#invoke:String|replace|<|°_°|>|'|}}}}{{#invoke:Page|fragment|<|°_°|>a}}{{#ifeq:{{#invoke:Page|isContentPage|{{#invoke:String|replace|<|°_°|>|'|}}}}|true||a}}|a}}||}}Template:Namespace detect

TemplateData

Template:TemplateData header <templatedata> { "params": { "1": { "label": "Correct title", "description": "The correct name of the page.", "type": "line", "required": true, "aliases": [ "title" ] }, "reason": { "label": "Reason", "description": "The reason the correct title cannot be used as the page title. Possible reasons are #, :, bracket, vbar (for |), and length.", "example": "#", "type": "line" }, "edit": { "label": "Substitution or omission", "description": "Override the word used to describe the difference between the correct title and the actual page title.", "type": "line" } }, "description": "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 WP:NCTR) affect the page name of the page they are reading.", "paramOrder": [ "1", "reason", "edit" ] } </templatedata>

See also

Template:Correct title examples