Manual talk:$wgAllowDisplayTitle
Add topicOlder talk
[edit]I have just updated MW to 1.10.1 and the pages that use DISPLAYTITLE work as before, i.e. I can specify any new title for override, not just normalized titles. Did I get something wrong?
BTW: Since we are making excessive use of subpages, using DISPLAYTITLE with the normalized restriction would be a bad thing for us. Are there any alternatives to display a title that's different from the wiki page name?
- This did break some page titles when psyklopedin.org went to MW 1.12alpha - 1.10 is likely unaffected.
- The relevant code is in includes/CoreParserFunctions.php near line 109. In "static function displaytitle()", the line that's adding these restrictions looks like:
- if( $title instanceof Title && $title->getFragment() == '' && $title->equals( $parser->mTitle ) )
- Try changing it to be:
- if( $title instanceof Title && $title->getFragment() == '' )
- That should remove the new/more-restrictive checks on what text may be used in a displaytitle if that's what your site's administrators want done. --66.102.80.212 20:11, 1 January 2008 (UTC)
- The position of this line is line 172 of includes/parser/CoreParserFunctions.php as of MW 1.14 but the rest is the same as above. Another alternative is
$wgRestrictDisplayTitle = false;
for 1.14 and later.
Interferences?
[edit]I set $wgAllowDisplayTitle to true but nothing happened, original titles everywhere (I did only lowercase the first letter). I did set $wgCapitalLinks to false some time ago, is there any interference between these two configs? Thanks in advance! Best regards, Peu 09:03, 13 November 2008 (UTC)
- To be clear, you're actually using DISPLAYTITLE on these pages? Is $wgCapitalLinks still set to false, or did you change it back to true at some point? What version of MediaWiki are you running? —Emufarmers(T|C) 20:31, 13 November 2008 (UTC)
- I use MediaWiki 1.13.0 and $wgCapitalLinks is still set to false (I cannot play freely with the config settings). --Peu 07:36, 14 November 2008 (UTC)
- Well, if wgCapitalLinks is false, "IPod" and "iPod" are no longer equivalent. And DISPLAYTITLE only works for equivalent titles. So yes, they interact. -- Duesentrieb ⇌ 21:16, 13 November 2008 (UTC)
- I want to remove the $wgCapitalLinks setting in the near future, that's why I ask. --Peu 07:36, 14 November 2008 (UTC)
Yes, There are interferences! I did the following:
- set up MediaWiki 1.13.3
- set $wgCapitalLinks = false;
- made some pages (starting with both, upper and lower case)
- set $wgAllowDisplayTitle = true;
- made changes to some titles (different only for the initial letter)
- have a look: nothing happened to the titles
- remove the line
$wgCapitalLinks = false;
- have a look: lowercase pages are not reachable, titles of uppercase pages appear modified
I have made a little how-to (see next section)
greetings from Berlin --Peu 10:31, 21 January 2009 (UTC)
HowTo: switch off sensity for page initals
[edit]All who decided to set $wgCapitalLinks
to false
long time ago, missing the function provided by the newer config value $wgAllowDisplayTitle
, can switch easily to title-overriding now, purchasing the implicit redirection from lowercase to uppercase forms. Try the following recipe:
- Move all lowercase pages to the uppercase variant.
- Remove the lowercase variants (yes, redirects will be implicit later).
- Remove the statement
$wgCapitalLinks = false;
- Add the statement
$wgAllowDisplayTitle = true;
- Be happy!
--Peu 10:31, 21 January 2009 (UTC)
Bug added
[edit]- I added a bug regarding the imposibility to use DISPLAYTITLE when you use $wgCapitalLinks=false - check https://bugzilla.wikimedia.org/show_bug.cgi?id=21478 and vote/comment on it if you consider it important.
--Sorin Sbarnea 17:40, 11 November 2009 (UTC)
DISPLAYTITLE not working for main page
[edit]Hi,
I'm running MW 1.17.4 and have $wgAllowDisplayTitle set to true and $wgRestrictDisplayTitle to false. I can now set arbitrary titles for wiki pages. However, this does not work for the main page - here, the title always stays the same. I do not want to move the main page - I like the short name but want a much longer title for SEO. Anyone knows how to achieve this? Is this a bug?