Jump to content

Template talk:Section link

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

Bugs

[edit]

{{see section||Soviet Union|Armenian SSR (Armenia)|label2=Armenian SSR}} displays §§ Soviet Union​ and Armenian SSR (Armenia). There are at least two bugs here. The multiple "§§" is one, and the lack of functionality for |label2= is another. I'd appreciate if this could be fixed for use at World War II by country. Thanks! {{u|Sdkb}}talk 20:21, 4 July 2022 (UTC)[reply]

Do we agree that the output should be § Soviet Union​ and § Armenian SSR (Armenia)? – i.e. with a single section sign per link — GhostInTheMachine talk to me 11:26, 10 October 2022 (UTC)[reply]
I believe we do. The disambiguation should be fixed by |label2=, as well. {{u|Sdkb}}talk 14:21, 11 October 2022 (UTC)[reply]
Bumping thread. Sdkbtalk 22:10, 28 May 2024 (UTC)[reply]
[edit]

is there anyway a wikilink could be added to the § symbol pointing to Section_sign. A lot of people don't know what that symbol means, myself included until very recently. Jake Jakubowski (Talk) 05:13, 14 June 2023 (UTC)[reply]

A wikilink wouldn't be appropriate I don't think, but we could maybe do hover text, like this:

{{tooltip|§|Section}}

which renders as:

§

However, this isn't accessible on mobile and I'm not sure about screen readers. — W.andrea (talk) 14:26, 17 April 2025 (UTC)[reply]
A current ongoing debate at Talk:Saint Valentine's Day Massacre § See also - List of organized crime killings in Illinois suggests to me that there would be merit in a tool tip for the § symbol. Currently the text displayed by {{section link}} appears as a single link, but it might be feasible to have two or three links:
  1. to the article
  2. to §
  3. to the section
Eg: Albert Einstein § Scientific career
(Perhaps with a more explanatory tool tip than "section mark", if possible.)
This is contrary to WP:SEAOFBLUE, but might be justified in contexts where the template is used. (Also see [1] for a comment on "where the template should be used".) Removing the first link (to the article, Albert Einstein) would reduce the impact of SEAOFBLUE. Mitch Ames (talk) 04:53, 6 September 2025 (UTC)[reply]

Wikipiping

[edit]

I rune into the necessity for wikipiping, e.g., the capital of Russia (hypothetical example). Can it be implemented as a parameter, e.g., {{section link|Stars in fiction|Neutron stars|pipe=life on the surface of neutron stars}}- Altenmann >talk 18:47, 18 August 2024 (UTC)[reply]

Most often, hypothetical examples are meaningless. Is your other example a real-life example, or just another hypothetical?
As currently written, this template and its module do not support piping. Likely, to do so would seem to conflict with the purpose of this template which is to make a pretty rendering of an unpretty wikilink where all parts of the wikilink are visible to the reader:
[[Stars in fiction#Neutron stars]]Stars in fiction#Neutron stars
{{slink|Stars in fiction|Neutron stars}}Stars in fiction § Neutron stars
If you want a piped link, make a piped link:
[[Stars in fiction#Neutron stars|life on the surface of neutron stars]]life on the surface of neutron stars
But, such links might run afoul of WP:EASTEREGG.
Trappist the monk (talk) 19:42, 18 August 2024 (UTC)[reply]
It is noit hypothetiical, and that's exactly what did in Life origination beyond planets three times, see the text "life with no sunlight" there and two more downtext. After second thought I nolonger see the advantage of using sectionlink template in such cases. Yes, I am aware of rotten Easter eggs, and I always fix them when I see them. --Altenmann >talk 23:32, 18 August 2024 (UTC)[reply]
I sometimes use the template to link to related sections in the same article. This means that I want to flag to readers they're staying in the same article (with the section symbol), and need to make sure the text fits within the sentence, often requiring piping. —Femke 🐦 (talk) 07:32, 12 July 2025 (UTC)[reply]

Template-protected edit request on 17 April 2025

[edit]

Is it possible to add an example usage in the template itself? I'm not super familiar with {{#invoke}}, but I know in other templates you can use <noinclude>, like

{{slink|{{{article|}}}<noinclude>Example article</noinclude>|{{{section|}}}<noinclude>Example section</noinclude>}}

W.andrea (talk) 14:20, 17 April 2025 (UTC) edited 17:27, 10 May[reply]

 Not done There are plenty of example on the doc page, and I don't see a good reason to deviate from the default behavior of the template displaying itself with no parameters. * Pppery * it has begun... 20:13, 22 April 2025 (UTC)[reply]

I don't see a good reason to deviate from the default behavior of the template displaying itself with no parameters.

People first learning about the template would be better served seeing an example of the template's intended usage rather than an error stemming from unintended usage. — W.andrea (talk) 17:24, 10 May 2025 (UTC)[reply]
Cf. {{Nothanks-web}} which noincludes "Page" — W.andrea (talk) 17:58, 10 May 2025 (UTC)[reply]
[edit]

Changes to this template+module cannot accomplish this, but: Does the default wikilink really have to make ugly links like this?

[[Albert Einstein#Scientific career]]Albert Einstein#Scientific career

... when it could instead make nicely formatted links like this template+module does?

{{section link|Albert Einstein#Scientific career}}Albert Einstein § Scientific career

Help:Cheatsheet lists both ways to "Link to a section".

I can't imagine where the link with the Article title § Section title section-link format would NOT suit better than the Article title#Section title format (though one might contemplate alternative glyphs and alternative spacings).-A876 (talk) 23:18, 27 August 2025 (UTC)[reply]

 Not done – no complete and specific description of the request. Generally such requests are in the form: change X to Y.
Not clear what you mean by Changes to this template+module cannot accomplish this. Accomplish what, specifically?
Trappist the monk (talk) 23:31, 27 August 2025 (UTC)[reply]
I regret making such a vague comment in this context. I withdraw it embarrassed.
(I would delete this whole section. If you would too, please do so.) (A new attempt follows.) -A876 (talk) 18:09, 28 August 2025 (UTC)[reply]

Make [[ ]] (wikilink) do the same as {section link|}!

[edit]

Pre-apologies:

  • I know I'm [mis]using {edit template-protected} to suggest changes to some other template. I do not request any edit here; I only hope for an opinion and maybe an idea of where to [re]post.
  • I have held this idea for a while, and sadly I must let it out. Now.
  • I would comment in the place where the code for [[ ]] is maintained, but [[ ]] is not a template. I don't know where to look. It might be a fundamental non-template hard-coded in MediaWiki. For lack of a better immediate place, I boldly rudely cram it in here to introduce it.

This template-and-module ({section link|}) makes "nice" section links, like this:

{{section link|Albert Einstein#Wormholes}}Albert Einstein § Wormholes

The standard [[   ]] (wikilink) makes the same target into a ugly (or less-nice) section link, like this:

[[Albert Einstein#Wormholes]]Albert Einstein#Wormholes

Help:Cheatsheet lists both ways to add a "Link to a section". If someone wants a "nice" link, they have to code for this template instead of using the default wikilink syntax.

Maybe it's time for [[   ]] (wikilink) to do the same thing (in the above case) that {section link|} does! Because:

  • Editors who want to add a "nice" link-to-a-section (without pipe) won't have to add the code for his template.
  • Every existing link-to-a-section (without pipe) would immediately become "nice".
  • I cannot imagine where a link like Article § Section would NOT suit better than a link like Article#Section (though one might contemplate using an alternate glyph and/or different spacing). Wouldn't everyone prefer it? -A876 (talk) 18:09, 28 August 2025 (UTC)[reply]
 Not done.
The [[ ]] markup is a MediaWiki primitive. If you think that MediaWiki should render a formatted unpiped section link in a way that is different from the way that unpiped section links are currently rendered, you will need to take that up with MediaWiki. I suppose that the place to do that might be at phabricator. Making that suggestion here will surely result in disappointment.
Trappist the monk (talk) 18:33, 28 August 2025 (UTC)[reply]

Template-protected edit request on 2 September 2025: Don't render on the template page if it's going to show an error

[edit]

Currently the template page shows:

{{Section link}}: required section parameter(s) missing

This isn't a good example, so it would be better to just remove it using <includeonly>...</includeonly>, like {{Multi-section link}} does.

I put this change on the sandbox.

Previously, I requested to add a good example, which was declined.

W.andrea (talk) 18:38, 2 September 2025 (UTC)[reply]

@W.andrea:  Done. Est. 2021 (talk · contribs) 10:06, 7 September 2025 (UTC)[reply]
[edit]

Editors are invited to comment at Talk:Saint Valentine's Day Massacre § See also - List of organized crime killings in Illinois on the relative merits of {{section link}} vs piped links in the "See also" section of an article. Mitch Ames (talk) 11:42, 5 September 2025 (UTC)[reply]

Custom conjunction word option

[edit]

I'd like a |conjunction= parameter, primarily for lists with the word "or". I have tested at the module sandbox with this edit, which works as expected as can be seen in "Case 18: custom conjunction word" at Template:Section link/testcases § Multiple sections. This permits constructions like Article §§ Section 1​ or Section 2. Dan Leonard (talk • contribs) 21:49, 7 October 2025 (UTC)[reply]

Not addressing the issue directly but I am curious: why this code:
conjunction = '&#8203; and ' – the original
conjunction_string = '&#8203; ' .. conjunction_word .. ' ' – the proposal
What purpose does &#8203; (Zero-width space) serve? Lines will break at the immediately adjacent 'space' character (&#32;) so why do we need the zero-width space?
Trappist the monk (talk) 22:24, 7 October 2025 (UTC)[reply]
I can't see a good reason for this. It seems to have existed since the first version of the module, so maybe Mr. Stradivarius might remember? The original template version used regular spaces (and briefly, &thinsp;) after the section signs, which might have had odd breaking behavior that the zero-width space was working around. Probably unnecessary though. Dan Leonard (talk • contribs) 23:06, 7 October 2025 (UTC)[reply]
@Trappist the monk: I removed the zero-width space from the sandbox and see no difference in the line break behavior at the testcases page, running Chromium version 141.0.7390.55. Dan Leonard (talk • contribs) 14:09, 8 October 2025 (UTC)[reply]
@Dan Leonard and Trappist the monk: The &#8203; was in the version of the template that I converted. It was added by User:Czarkoff here. — Mr. Stradivarius ♪ talk ♪ 14:27, 8 October 2025 (UTC)[reply]
Pinging Trappist the monk again because I messed up the first one. — Mr. Stradivarius ♪ talk ♪ 14:31, 8 October 2025 (UTC)[reply]

Not done for now—Feel free to reactivate when discussion is resolved. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 17:18, 8 December 2025 (UTC)[reply]

embedding into parameter of {{copied}} template

[edit]

I'm trying to follow the instructions for Section moving. Step 6 suggests: "A {{copied}} template can be added to the talk pages of both the source and destination articles." I was hoping to embed {{section link}} into the {{copied}} template, in order to display the destination article's new section heading. However, embedding into the {{copied}} template's parameter to={{section link|Election denial movement in the United States|Election vigilante groups}} encloses the displayed link within [[ ]] brackets. Is there a way to display the link without brackets?

P.S. on Section moving's talk page, I also asked about an alternative template to {{copied}}. rootsmusic (talk) 03:38, 29 March 2026 (UTC)[reply]