Jump to content

Template talk:Redirect

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
(Redirected from Template talk:Redirect2)

Different hatnotes depending on what the user searched for

[edit]

I've created a redirect for The Present Tense, which is the name of a song by Radiohead, pointing to A Moon Shaped Pool, the album it appears on. I think it might be a good idea to display a hatnote saying "for the grammatical tense, see Present tense", but I only want that to appear if the user arrived at A Moon Shaped Pool by searching for The Present Tense. Does that make sense? If so, is there a way to do it? Popcornduff (talk) 12:58, 16 December 2018 (UTC)[reply]

This makes sense. And it ties with the topic by Popcornfud. Hatnotes should only appear in the article if the user was redirected from a specific search term.--TZubiri (talk) 19:57, 30 June 2021 (UTC)[reply]

TZubiri, wow, my original comment was 3 years ago. I recall there was some suggestion of this idea somewhere else at some point but it didn't get much discussion there either. A while ago I typed up some more thoughts on my userspace here but I didn't do anything with the idea. Disambiguation hatnotes still bother me. Popcornfud (talk) 21:22, 30 June 2021 (UTC)[reply]

That's great thanks! I added the essay and the example to Wikipedia_talk:WikiProject_Redirect#Displaying_hatnote_redirects_only_when_redirected. where I am compiling examples of the problem and previous discussions on the subject. If you find or can think of any more resources, feel free to add them there! I'll do my best to get this fixed, it might take a while though!--TZubiri (talk) 21:44, 30 June 2021 (UTC)[reply]

TZubiri, thanks. I'm not technical at all and I don't know anything about how you get this kind of thing changed on Wikipedia. Good luck! Popcornfud (talk) 22:02, 30 June 2021 (UTC)[reply]

Suggestion: display certain hatnotes only if the user has been redirected from certain targets

[edit]

The Blue Album is an album by Weezer. It contains a song called "The World Has Turned and Left Me Here". There is also an episode of a TV show titled "The World Has Turned and Left Me Here".

If you go to the Blue Album article (Weezer (Blue Album)), it currently displays this hatnote: The World Has Turned and Left Me Here" redirects here. For the Vampire Diaries episode, see The World Has Turned and Left Me Here (The Vampire Diaries).

I think this hatnote should only be displayed if the user has searched for "The World Has Turned and Left Me Here" and been redirected to Weezer (Blue Album). My logic is this:

  • If you're redirected to the Blue Album article because you were looking for an article about the TV episode, the hatnote is useful. It tells you that you're in the wrong place and gives you a link to the right article.
  • If you arrive at the Blue Album article any other way, the hatnote isn't useful - you almost certainly don't care that there is an episode of a TV show with the same title as a song on this album. It's just clutter.

It would be great if there were a way to display certain hatnotes only if the user has been redirected from certain targets. Popcornfud (talk) 14:53, 11 April 2020 (UTC)[reply]

@Popcornfud: We can't do anything about that here - it requires a software change, for which you need to file a feature request at phab:, see WP:Feature request. --Redrose64 🌹 (talk) 20:00, 11 April 2020 (UTC)[reply]
Redrose64, I did in fact request it over there last year - see phabricator:T232278.
I was told: this is not done by the MediaWiki software but by a local template on English WIkipedia, and closing this task as invalid as this is about changing on-wiki content of a wiki page, which needs to be discussed on that local wiki.
Any suggestions? Popcornfud (talk) 20:03, 11 April 2020 (UTC)[reply]
Either I misunderstood the request, or AKlapper (WMF) (talk · contribs) did. I suppose you could try WP:VPT. --Redrose64 🌹 (talk) 21:48, 11 April 2020 (UTC)[reply]
Redrose64, I tried to clarify my understanding (which might be wrong) in phab:T232278#6049864. HTH. :) --AKlapper (WMF) (talk) 09:23, 12 April 2020 (UTC)[reply]
AKlapper (WMF), thanks again for the reply there.
However, I'm now kind of lost. I'm not technically minded enough to follow your reply at phab, and I see that the task there is still closed. All I want to do is lodge the suggestion. Is it now in its proper place? Should I ask at WP:VPT? Popcornfud (talk) 13:17, 12 April 2020 (UTC)[reply]
Redrose64 Either WP:VPT, or on the talk page of the template itself, I'd say. --AKlapper (WMF) (talk) 15:21, 12 April 2020 (UTC)[reply]
OK, thanks, I've tried at WP:VPT. Popcornfud (talk) 15:33, 12 April 2020 (UTC)[reply]

I feel this is one of the most worthwile technical changes to implement, regardless of whether it is MediaWiki or En Wiki's responsiblity, let's try to find more iconic examples:

- Human body An article about the human anatomy, mentions a textbook called "Anatomy of the human body" even if one did not search that. If reached through other methods this hatnote should not appear. This presents a neutrality issue by immediately focusing on one of the many sources rather than the one subject.

--TZubiri (talk) 22:50, 29 June 2021 (UTC)[reply]

Anatomy of the Human Body does redirect to the textbook. 20 pageviews in the past year. Gray's Anatomy links to human body in the lead sentence.
The generic form Anatomy of the human body has 105 pageviews in the last year.
Human body has 798,423 pageviews in the past year.
So the implicit rationale is that those searching for the book will take the time to use their shift keys or select the uppercase option from the search drop-down and those searching for the lowercase term are predominantly looking for the broad-concept article which is the primary topic and inconveniencing those <100 readers/year that search on "anatomy of" by sending them to the book and making them click on the link in the lead sentence to get back to the article they really want to see is just unacceptable, but annoying some 798,000 readers/year with this hatnote is an acceptable compromise in order to avoid the inconvenience of forcing some subset of 105 readers to make an extra mouseclick to get where they want to go. You could bring this up at WP:Redirects for discussion.
Don't hold your breath waiting for a technical solution. – wbm1058 (talk) 00:56, 30 June 2021 (UTC)[reply]
Thank you for the analysis! I might take this opportunity to delve into WikiMedia development, so if the problem is merely technical I would try to fix this myself, I just want to make sure that the community is on board and to gather the appropriate historical consensus and a good list of cases before bringing it up to the development team.--TZubiri (talk) 19:53, 30 June 2021 (UTC)[reply]
[edit]

Would it be possible (or a good idea) for this template to put pages into a maintenance category if it includes more than a certain number of links, for example Category:Hatnotes with more than three linked pages? In cases like that, you really should be creating a disambiguation page, so if this template could put pages in such a category, it would help us find pages that need one. Oiyarbepsy (talk) 06:12, 24 April 2021 (UTC)[reply]

Documentation and example

[edit]

Hi all. I have two requests: for the usage in an example, and for improving the documentation. Can someone let me know which template would be appropriate for National World War I Museum and Memorial? Is that article's requirement too complicated for this template? Part of the reason for asking is that the documentation for this template is incomprehensible, even while testing it in preview. The example lists several numerical arguments like "1=" but the explanations are perfectly obtuse, recursive, and meaningless. Could someone please elaborate there, even with a few more words? Thank you. — Smuckola(talk) 22:53, 15 August 2021 (UTC)[reply]

The template should never be as complex as the current version of the hatnote at that article would require. The hatnote is simply way too long. First and foremost, Liberty Memorial should probably be a disambiguation page. Other memorials can be covered by linking to List of World War I monuments and memorials. A link to those two should be all that is included. I'll start working on that later today. Oiyarbepsy (talk) 23:58, 15 August 2021 (UTC)[reply]
@Smuckola: the right template for that article would be {{Redirect2}} (and for even more complicated scenarios, either {{redirect-multi}} or {{redirect-several}} can be used). – Uanfala (talk) 12:06, 18 August 2021 (UTC)[reply]

"See Wiktionary" template

[edit]

I've added a mention of {{See Wiktionary}} with its "redirect" parameter, as this creates a hatnote like

""Foo" redirects here. For a definition of the term "Foo", see the Wiktionary entry Foo.",

which looks like the output from this template, and will be of use to some editors who come to this template's documentation page hoping to make such a redirect. (In my case I wanted to replace the Wiktionary redirect at SMIDSY after retargetting it to Beryl (company): see discussion at Wikipedia_talk:WikiProject_Redirect#Hatnote_for_a_Wiktionary_redirect?) PamD 07:36, 19 July 2022 (UTC)[reply]

Unneeded linking

[edit]

When using this template, I don't think that given redirects should actually be "linked" to. This causes many issues such as if the redirect is tagged as misspelling (such as OB1, Pages that link to "OB1"), when it really isn't linking to that page. ~ Eejit43 (talk) 18:26, 28 December 2022 (UTC)[reply]

@Eejit43: misspellings and miscapitalizations should not be seen in hatnotes. Preference should always be given to targeting the correct spelling.
  1. retarget to the correct destination
  2. remove the hatnote
Problem solved. – wbm1058 (talk) 04:54, 30 December 2022 (UTC)[reply]
Easy enough, thanks! ~ Eejit43 (talk) 13:03, 30 December 2022 (UTC)[reply]

linking of the original redirected term for use with section redirects

[edit]

Cf. Wikipedia:Village_pump_(idea_lab)#Redirect_hatnote_link. --Joy (talk) 11:43, 3 July 2023 (UTC)[reply]

Selfref parameter

[edit]

Unlike {{for}}, {{redirect}} has no support for a self reference parameter. I believe that would be a useful feature in some cases like [1] (this example happens to use redirect2). Nickps (talk) 11:39, 6 April 2024 (UTC)[reply]

Template-protected edit request on 10 April 2024

[edit]

Since no one objected above, I'm now asking that a selfref parameter be added to this template, analogous to the one {{for}} has. Nickps (talk) 19:28, 10 April 2024 (UTC)[reply]

 Not done: |selfref= is already implemented. See the testcases for it in action. SWinxy (talk) 21:20, 10 April 2024 (UTC)[reply]
I guess I should have done better due diligence. Thanks for updating the docs. Nickps (talk) 22:43, 10 April 2024 (UTC)[reply]

Template inject blank paragraph

[edit]

In certain cases this template would inject <p class="mw-empty-elt"> in content, which have no text in it. How to fix that? See this screenshot. -- Great Brightstar (talk) 19:32, 4 June 2024 (UTC)[reply]

The reason of this problem is found out. {{Stack begin}} have something missing that affect mobile frontend. -- Great Brightstar (talk) 15:19, 6 June 2024 (UTC)[reply]