Template talk:Section

From WikiProjectMed
Jump to navigation Jump to search

Content disappears

I'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)[reply]

I'm working on this. --  Gadget850 (Ed) talk 16:06, 21 April 2013 (UTC)[reply]
Try it now. Note that I changed 'article' to 'page'. --  Gadget850 (Ed) talk 16:26, 21 April 2013 (UTC)[reply]
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.

Module talk:Citation/CS1/Help

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)[reply]

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)[reply]

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)[reply]
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)[reply]

Experimentation

Just 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)[reply]

Wikimarkup inside extension tags is not parsed. #tag was developed to get around this. --  Gadget850 (Ed) talk 10:56, 22 April 2013 (UTC)[reply]

Encouragement

It 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)[reply]

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)[reply]