Template:Retitle

From OniGalore
Revision as of 20:21, 23 May 2013 by Iritscen (talk | contribs) (actually it all depends on what $wgRestrictDisplayTitle is set to)
Jump to navigation Jump to search

MediaWiki has a few technical limitations, which are catalogued HERE. One of these restrictions is that the URL for an article cannot contain spaces. As a "smart" workaround for the fact that this would lead to articles with names like "Jimmy_Carter", the MW software automatically converts the underscores in the URL to spaces in such places as the title of the article at the top of the page. In other words, MW assumes that you didn't really want that underscore to be there, so it "makes it better" by giving you spaces everywhere that it can. Sometimes this is undesired behavior.

An example from our own wiki, look at the ai2_allpassive page. Ignoring that this is a redirect page, notice that the page title is displayed with a space in it, even though the underscore actually belongs there. This is purely an aesthetic concern, of course, but it definitely looks weird. To fix such a page, you would put {{Retitle|ai2_allpassive}} anywhere in the markup, and voila! your underscore is in its rightful place in the title.

Note that the abilities of this template are affected by the setting of $wgRestrictDisplayTitle. If it is set to true, you cannot supply a new title that does not evaluate as "equivalent" to the old one, such as "ai_allpassive". You can only change punctuation like the underscore. However, if $wgRestrictDisplayTitle is false, you can supply this template with any string and the page will be retitled as desired.

  • Attention: Please do not Subst: this template. MediaWiki's article-titling abilities may improve or change in the future.