Advent calendar 3: Changing a page title without moving the page

3-Advent-Calendar-Displaytitle

 

Sometimes it can be useful to change the title of a wiki article, but without moving the page. This means, that the URL stays the same and all links that refer to this site remain active. Only the title in the content will be displayed differently.
For example: You created the page “Prices” as a subpage of “Products”. The title will be shown this way “Products/Prices”. You don´t like it, because you only want “Prices” to be shown as the page title? Just use the variable  DISPLAYTITLE  to define any title, which should be displayed. Here is the code, according to our example:
{{DISPLAYTITLE:Prices}}

There are lots of use cases for this feature, e.g. if you want to shorten a very long title, if you want to hide the prefix of a namespace (like turning “Portal:Quality Management” into “Quality Management”), and so on. Or also if you want to overcome the MediaWiki obstacle of the mandatory capital letter (for example an article about the “IPod” looks much better if you change it to “iPod”).

Attention: Please take into consideration, that it could confuse your users when they are looking for the article. They keep the title in mind, but can´t find it because the wiki system is still using the real title of the page.

 

 

You Might Also Like

Leave a Reply