Help talk:Labeled section transclusion
Documenting use of this neat new feature
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)
- @Gadget850: Actually, come to think of it - rather than using the
<section>
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)- 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)- How annoying. I've subscribed to Template:Bug - thanks. — Scott • talk 22:46, 15 February 2014 (UTC)
- Because parser tags must use #tag to include variables and #tag does not work with
- @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)
Is labeled section transclusion useful only when there are more than one labeled sections to transclude?
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)
- 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)
Transclusion did not bring references along too
- For help with this template, please post a comment on the template talk page with a
{{reply to}}
one or more of the previous editors.
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)