Template talk:For

From Wikipedia, the free encyclopedia
Jump to: navigation, search

Link formatting[edit]

Unlike other hatnote templates like {{See also}} and {{Details}}, this one doesn't have its own Lua module (see Module:Hatnote). One thing that Lua provides is dynamic link formatting for things like section and category links. Have a look at the following and you'll see the difference:

Markup Renders as
{{see also|PAGE#SECTION}}
See also: PAGE § SECTION
For more details on this topic, see PAGE § SECTION.

Ideally this template will eventually join its siblings in module-land. In the meantime, I would like to propose the following edit, using {{Format link}}, to make it behave more like the others:

{{Hatnote|For {{#if:{{{1|}}}|{{{1}}}|other uses}}, see {{format link|{{{2|{{PAGENAME}} (disambiguation)}}}}}{{#if:{{{3|}}}|{{#if:{{{4|}}}|, {{format link|{{{3}}}}}, {{#if:{{{5|}}}|{{format link|{{{4}}}}}, and {{format link|{{{5}}}}}|and {{format link|{{{4}}}}}}}| and {{format link|{{{3}}}}}}}}}.}}

Which would give us...

Markup Renders as

Does that look correct? Anyone interested can test it using {{For/sandbox}}, with the same parameters as you would use with this template. Ibadibam (talk) 22:36, 24 September 2014 (UTC)

Edit request[edit]

Per above and this example. Ibadibam (talk) 23:30, 29 September 2014 (UTC)

Yes check.svg Done. Thank you — Martin (MSGJ · talk) 08:23, 1 October 2014 (UTC)
While I like the idea behind the proposed edit, the implementation caused some unwanted results in hatnotes such as at Black Widow (song) where the hatnote is {{For|other songs by the same title|Black Widow (disambiguation)#Songs|Black Widow}} where the expectation is for it to be displayed as a piped link. olderwiser 15:38, 3 October 2014 (UTC)
It's the same problem that appears when using the {{redirect}} template here. I left a note about that for Edokter (talk · contribs), now archived at User talk:Edokter/Archive 8#Monk (Doctor Who). --Redrose64 (talk) 16:41, 3 October 2014 (UTC)
The pipe hack seems to work there (for now), but I have no thoughts about how this should be handled in the future. -- [[User:Edokter]] {{talk}} 17:50, 3 October 2014 (UTC)

Support for section linking[edit]

This template seems not to change Article#Section into Article § Section as {{Further}} does. For instance, I was adding this hatnote:

  • {{for|a table of examples of palatalized n and l in Romance languages|Palatalization#Mouillé}}
  • For a table of examples of palatalized n and l in Romance languages, see Palatalization#Mouillé.

So I had to use {{For2}}:

Is this intentional, or could it be remedied? — Eru·tuon 08:39, 3 January 2015 (UTC)

Oh, I see it was already mentioned. So a change was made fixing this problem, but then reverted? — Eru·tuon 08:46, 3 January 2015 (UTC)

I was coming to ask the same thing. Is this intentional?--Cúchullain t/c 16:56, 3 June 2015 (UTC)
The rationale for reverting this seems to be that section-liking broke piped links, such as here.
Curiously enough, I find that Black Widow (song) isn't linked from Black Widow.
That seems to be breaking some WP:PDAB advice, as I don't think "Black Widow" rises to the notability standards suggested by "Thriller" and "Revolver".
Nonetheless, I suppose this template should be fixed to recognize when a link is piped, and only use Article § Section on non-piped links. Wbm1058 (talk) 19:25, 13 September 2015 (UTC)

"Not to be confused with" typos[edit]

I've occasionally seen the {{confused}} template used in the style of Google's "did you mean..." autocorrect, where one word is spelled very similarly to another. (Reality: "Not to be confused with Realty.") It seems a little perverse to present an easily-misread typo in a vague "don't confuse this with that" sentence where the reader may well misread it. Is it worth having a dedicated template for common typos? Or is "see also this similarly-spelled word" simply an inappropriate hatnote? --McGeddon (talk) 10:30, 15 July 2015 (UTC)


This documentation is unreadable. Can it please give an example of how to code two possible alternatives? Prhartcom (talk) 00:09, 23 September 2015 (UTC)

@Prhartcom: I did this. It's a start. --Redrose64 (talk) 09:15, 23 September 2015 (UTC)
That helps. Still doesn't start at the beginning. Made another improvement. Prhartcom (talk) 02:14, 24 September 2015 (UTC)
I amended it; in particular, I reverted your change of "being produced by" to "producing", since it is incorrect to state

The third, fourth and fifth parameters are used to give two, three, or four supplementary links:

For similar terms, see Foobar and Bar.
For similar terms, see Foobar, Bar, and Baz.
For similar terms, see Foobar, Bar, Baz, and Quux.

the last producing e.g. {{for|similar terms|Foobar|Bar|Baz|Quux}}.

However, if you really want that word, it would be correct to also exchange the example code with its demonstration, provided the two preceding demonstrations were also removed:

The third, fourth and fifth parameters are used to give two, three, or four supplementary links, {{for|similar terms|Foobar|Bar|Baz|Quux}} producing e.g. .

For similar terms, see Foobar, Bar, Baz, and Quux.
since "[code] produces [demo]" is equivalent to "[demo] being produced by [code]". --Redrose64 (talk) 10:06, 24 September 2015 (UTC)

Double periods?[edit]

Is there any way to avoid the appearance of double periods at the end of a sentence? For instance, the page for Donald S. Lopez, Sr. uses the for template to point to Donald S. Lopez, Jr. (It looks like this: {{For|the Professor of Buddhism|Donald S. Lopez, Jr.}}). The period at the end of the junior appears right next to the sentence-ending period, and it looks awkward: For the Professor of Buddhism, see Donald S. Lopez, Jr.. <--- See the two periods at the end. Anything we can do about instances like this? Thanks 04:29, 4 February 2016 (UTC)