Topic on Extension talk:Display Title

Option to not change redirects

7
Summary by Cindy.cicalese

$wgDisplayTitleFollowRedirects was added to allow suppression of display title substitution on redirects.

Notmadewelcome (talkcontribs)

I use DisplayTitle to get better names in categories and DPL lists, but its automatic application for redirects makes looking through unused redirects for ones to cull much harder, as the names are the same both sides, and it makes What Links Here very confusing for variants of a person's name. A switch to disable the feature for redirects would be most welcome. Notmadewelcome (talk) 23:36, 19 February 2019 (UTC)

It seems that hacking DisplayTitleHooks.php to comment out line in function getDisplayTitle

 $title = $redirectTarget;

does what I want, but I don't like hacks.

Proactive programming (talkcontribs)

Actually you need to comment all of the following lines:

lang

1 /*
2 		$redirectTarget = $wikipage->getRedirectTarget();
3 		if ( !is_null( $redirectTarget ) ) {
4 			$redirect = true;
5 			$title = $redirectTarget;
6 		}
7 */
Cindy.cicalese (talkcontribs)

Would you want this switch to be a user preference, as you suggest in Topic:Uujt8h1k1llzuyih, or a configuration variable? That is, in Topic:Uujt8h1k1llzuyih, you suggest turning off the extension functionality completely based upon a user preference; would that also satisfy this request? Or would you still want to be able to turn off only the redirect functionality and to do so unilaterally for all users (a configuration variable)?

Notmadewelcome (talkcontribs)

I'd have the redirects option as a configuration variable, as I think it would be appropriate or not for the site as a whole. A user preference would be overkill.

Cindy.cicalese (talkcontribs)
RheingoldRiver (talkcontribs)

Super late here, but I just added this as a config flag. You can set $wgDisplayTitleFollowRedirects to false in LocalSettings if you want to suppress this behavior.

TheOnlyZac (talkcontribs)

I've set $wgDisplayTitleFollowRedirects to false on our wiki but it doesn't seem to be working. Links to redirect pages are still being displayed as the title of the page they redirect to, and when you are redirected to a page it will say "Redirected from [the page you are already on]", which is confusing. Am I missing something, or is the config flag just not fully/correctly implemented yet? I noticed it's not documented at all on the extension page.

Reply to "Option to not change redirects"