Help talk:Labeled section transclusion

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Documenting use of this neat new feature[edit]

This is great; I'm really surprised that I've not heard of it before. As its use in the wild may not be immediately obvious to an editor encountering it, should we make it good practice to accompany it with a comment, something along the lines of <!-- See Help:LST -->? — Scott talk 16:49, 14 February 2014 (UTC)[reply]

@Gadget850: Actually, come to think of it - rather than using the &lt;section&gt; tag directly, it would be better to use templates generating the tag - say, {{section begin}} and {{section end}}. That way, anyone encountering them in the code would be able to go immediately to the template for documentation. It's hard to find a help page for a raw tag. What do you think? — Scott talk 00:38, 15 February 2014 (UTC)[reply]
Because parser tags must use #tag to include variables and #tag does not work with <section>. See the Templates section and {{section}}. --  Gadget850 talk 01:18, 15 February 2014 (UTC)[reply]
How annoying. I've subscribed to T39256 - thanks. — Scott talk 22:46, 15 February 2014 (UTC)[reply]
@Scott: Good idea. I just encountered Template:Latest tech news "in the wild" and did just that. Now, I see your comment here confirming the rationale for my edit. My initial guess was that #lst: meant "last section", so I changed that to #section: as well. Regards, Wbm1058 (talk) 11:35, 24 July 2014 (UTC)[reply]

Is labeled section transclusion useful only when there are more than one labeled sections to transclude?[edit]

mw:Extension:Labeled Section Transclusion says: "Its functionality is similar to an enhanced version of the <onlyinclude> tag with normal wiki transclusion, which selects sections for inclusion." It seems to me that <onlyinclude> is incompatible with labeled section transclusion, i.e., if you use one, you can't use the other. If there is only one section to be "onlyincluded", then using <onlyinclude> tags is sufficient for the purpose, and there is no benefit to converting those to a single labeled section. Only if one wants to have multiple labeled sections on the same page, does using labeled section transclusion become worthwhile. Is that correct? Wbm1058 (talk) 12:25, 24 July 2014 (UTC)[reply]

Sounds about right. Never tested the interaction between <onlyinclude> and <section> but I would not recommend mixing them. --  Gadget850 talk 14:43, 24 July 2014 (UTC)[reply]

Transclusion did not bring references along too[edit]

Gadget850 Using the instructions at Help:Labeled section transclusion#Section marking I was happy my two section transclusions worked on Planned Parenthood but was dismayed to find it broke the references that were included in the two sections. The transclusion did not transclude the references too.

Here are the two sections I transcluded to:

Planned Parenthood#Center for Medical Progress videos
Planned Parenthood#Violence by anti-abortion activists

Ping me back. Cheers! {{u|Checkingfax}} {Talk} 23:51, 10 November 2015 (UTC)[reply]

@Checkingfax:. Think of transclusion of a section as acting as if you typed that section exactly here – but nothing else from the other page. You probably know that if you make a named reference like:
<ref name="New York Times">{{cite news|newspaper=The New York Times|title=Title|date=Date|etc/}}</ref>
Then the next time you want to use that citation, all you need to do is type:
<ref name="New York Times" />
You may also know that if someone removes the original place where the named reference is defined, then <ref name="New York Times" /> will be broken, because the named reference – what defined it – no longer exists. In a nutshell, that's exactly what's happening here. It's not that the "transclusion did not transclude the references too", it did, it's just that the transcluded section was not the place in the source article where the named reference was defined. That is, you're transcluding things like <ref name="New York times /> without <ref name="New York times>{{cite news|newspaper=The New York Times|title=Title|date=Date|etc/}}</ref> being part of the section. This is one of the limitations of transclusion. The only way I can think of to "fix" it is to go to the source and change where the first use of any citations included are defined to be part of the transcluded section. I suppose if the source was useful here for some other purpose, if you placed it somewhere else on the page and gave it the same reference name, then it would work. Barring that, you will need to copy the content over and place the named ref for the first use of each one that is divorced from its definer (but don't forget mandatory copyright attribution if you copy content over). Best regards--Fuhghettaboutit (talk) 03:12, 11 November 2015 (UTC)[reply]
Thanks, Fuhghettaboutit. Wow, that surprises me since WP is so picky about references. Not being able to transclude references is a real throwback. I would expect the references to link back to the page they're transcluded from so there's no chance of them being out of sync and so there is no extra work to perform. Cheers! {{u|Checkingfax}} {Talk} 08:21, 11 November 2015 (UTC)[reply]

Rename to Help:Section transclusion[edit]

I propose we change the title from Labeled section transclusion to Section transclusion. Although the special <section> markup is possible (for transcluding multiple, adjacent sections in a so-called "section"), this labeling is not necessary (to transclude a section in that term's usual wikitext sense). We just use

{{#section-h|section title}}.

No labeling is needed to transclude a section.

The rename would

  • normalize the term section (It's not really a "section" if its labeled.)
  • ease search
  • shorten the title

Cpiral§Cpiral 21:57, 28 November 2016 (UTC)[reply]

It's named by mw:Extension:Labeled Section Transclusion and has codes starting with #lst although alternative names are available. It would be confusing to not use the MediaWiki name in documentation of a MediaWiki feature. Help:Section#Section transclusion mentions other methods. PrimeHunter (talk) 00:28, 29 November 2016 (UTC)[reply]
Right. A shortcut to Help:Section#Section transclusion or a redirect to here would address the issues. In any case it needs improvement, and I will work on it. Thank you. — Cpiral§Cpiral 01:54, 29 November 2016 (UTC)[reply]

 You are invited to join the discussion at Wikipedia talk:AutoWikiBrowser/General fixes § Bug: Inserting extra line break. {{u|Sdkb}}talk 23:31, 27 October 2020 (UTC)[reply]

2020–21 in Belgian football#Managerial changes[edit]

Hi everyone, could anyone explain to me why on 2020–21 in Belgian football#Managerial changes the labeled section from 2020–21 Belgian First Division A is not displayed, while the section from 2020–21 Belgian First Division B is? I'm probably just overlooking something but can't figure it out. Pelotastalk|contribs 20:02, 3 December 2020 (UTC)[reply]

Since no one here has noticed the question (or knows the answer), I've asked it at Wikipedia_talk:WikiProject_Football#2020–21_in_Belgian_football#Managerial_changes. So all further info will come there, in case anyone's interested :) Pelotastalk|contribs 12:20, 19 February 2021 (UTC)[reply]

2023 FIFA Women's World Cup[edit]

I would like to update the knockout bracket because it's been almost a day since the Sweden-USA match and no one has added the result on the main article yet, and both the bracket and the match summaries are on this LST format. I tried reading the main page to figure out how to edit them, but unfortunately I couldn't understand. Can anyone help? Damn me (talk) 02:56, 7 August 2023 (UTC)[reply]