Template talk:Multi-section link

Development request
It would be exceedingly helpful for WP:POLICY documentation, and in-article cross-references in complex articles, to have a variant of this, whether it be or  that produced identical output to this, except that it:
 * 1) Linked each individual section, not just the last one (and linked those names without linking the section symbols)
 * 2) Linked the pagename also (when not suppresed), unless already on that page (we don't want to boldface by self-linking).

This should be used for pretty much every sub-sectional policy/guideline cross reference in hatnotes on such pages. — SMcCandlish ☺ ☏ ¢ ≽ʌⱷ҅ᴥⱷʌ≼  18:52, 23 July 2015 (UTC)

PS: The function to do this should be reusable, e.g. by Module:Hatnote, etc.  — SMcCandlish ☺ ☏ ¢ ≽ʌⱷ҅ᴥⱷʌ≼  00:33, 25 July 2015 (UTC)

Missing basic feature
Unlike Template:Section link, this one throws an error if you leave the first parameter blank. That's not desirable at all; it should just skip it. — SMcCandlish ☺ ☏ ¢ ≽ʌⱷ҅ᴥⱷʌ≼  08:54, 24 July 2015 (UTC)
 * By "skip it", do you mean just creating a link like  instead of  ? — Mr. Stradivarius  ♪ talk ♪ 09:32, 24 July 2015 (UTC)
 * Yeps. We use this all the time (with for "See X section, below" in the same page. If this one and the above-proposed breadcrumbs version worked that way, that'd be hot.  As in   to produce , and I think it'd be   for   itself.  — SMcCandlish ☺ ☏ ¢ ≽ʌⱷ҅ᴥⱷʌ≼  00:32, 25 July 2015 (UTC)
 * I support this proposal. — UnladenSwallow (talk) 15:38, 2 June 2024 (UTC)

Bug causes linking to wrong section
The code

should yield the URL

but instead yields

which is to an earlier section with the same title, i.e., Alexei Navalny § Kirovles case §§ Case.

Result:

If this cannot be fixed, it could be explained as a technical limitation in the doc. Knr5 (talk) 20:19, 24 August 2020 (UTC)


 * I had the same problem when I needed to reference a subsection in the Planck constant article: it has the § History section with the anchor #History and the § Reduced Planck constant ℏ §§ History subsection with the anchor #History_2. It would certainly be nice for  to automatically use the correct anchor. However, implementing this would require creating a special breadcrumbs-to-anchor index for each page with section title conflicts, otherwise the referenced page would have to be parsed each time   is invoked. — UnladenSwallow (talk) 16:23, 2 June 2024 (UTC)

Add parameter
Please add  parameter with the same behavior as in  : "If set to "yes", "y" or "true", hides the page name (only section names are displayed)." — UnladenSwallow (talk) 15:33, 2 June 2024 (UTC)