Template talk:Section
Content disappears
editI've just started experimenting with this template. For the definition portion, content seems to disappear. I replaced a raw <section>
in Help:CS1 errors and the section disappeared from the article. Not obvious to me why that's happening.
—Trappist the monk (talk) 15:49, 21 April 2013 (UTC)
- I'm working on this. -- Gadget850 (Ed) talk 16:06, 21 April 2013 (UTC)
- Try it now. Note that I changed 'article' to 'page'. -- Gadget850 (Ed) talk 16:26, 21 April 2013 (UTC)
The definition that I set up is at the top of Module talk:Citation/CS1/Help. The identified "content" should be visible between the two lines of text there - there should be three lines of text. As I write this, there are only the two outer lines
{{section |page=Module talk:Citation/CS1/Help |title=test_section_title}}
→This template is currently non-functional due to T39256.
The text should have been transcluded on the right side of the → above. As I write this, I see nothing.The source test has been removed.
- And speaking of names, as I wrote some additional documentation text, it occured to me that
|label=
might be less confusing than|title=
. - —Trappist the monk (talk) 16:44, 21 April 2013 (UTC)
- And speaking of names, as I wrote some additional documentation text, it occured to me that
And I hit a showstopper bug. To use <section>
with variables, I have to use #tag. Unfortunately #tag generates balanced tags, so:
- {{#tag:section|content|begin=abcd}}
Generates:
- <section begin="abcd">content</section>
And sure enough: T39256 -- Gadget850 (Ed) talk 17:00, 21 April 2013 (UTC)
- Well then ... Since you aren't the first to have this idea, nor likely the last, perhaps the content of the template should be changed to something to indicate that it doesn't work until the bug is fixed. That way, if someone uses
{{section}}
they get an error message. That also leaves your work and this talk page so that when the bug is fixed you can start up again where you left off.
- —Trappist the monk (talk) 17:12, 21 April 2013 (UTC)
- Done. I was going to move it to user space, but I would rather leave it as a place holder. This template has been used for several purposes over the years. -- Gadget850 (Ed) talk 17:48, 21 April 2013 (UTC)
Experimentation
editJust because I was curious, I replaced the text designator line with:
<section begin={{{title|}}} />{{{content|}}}<section end={{{title|}}} />
This does not work. Whatever is between the two section tags disappears. Why is that?
I suppose that there could be a {{section begin|title}}
and a {{section end|title}}
pair of templates and still use {{section}}
in the destination page ...
I should go back to bed.
—Trappist the monk (talk) 09:21, 22 April 2013 (UTC)
- Wikimarkup inside extension tags is not parsed. #tag was developed to get around this. -- Gadget850 (Ed) talk 10:56, 22 April 2013 (UTC)
Encouragement
editIt would be amazeballs great if a way to manifest the intended functionality of this template would arise! : } ––A Fellow Editor– 13:44, 8 December 2017 (UTC)
- For example in conjunction with the "support context" feature of citation template {{R}} (and its optional
|section=
parameter). - --Matthiaspaul (talk) 18:22, 1 September 2021 (UTC)