Issue:Labeling Sections from Templates
Description: | Section labeling doesn't seem to work from within templates. |
Extension / Version: | DPL / 1.6.8 |
Type / Status: | Bug / open |
Problem
My problem is related to labeling sections for future labeled section transclusion. Let's say I have the following page:
<section begin=foo /> Some text. <section end=foo />
Instead of having the raw section tags, though, I want to have two templates:
Template:BeginFoo
<section begin=foo />
Template:EndFoo
<section end=foo />
such that I can do the following:
{{BeginFoo}} Some text. {{EndFoo}}
The problem is, this doesn't seem to work! Looking at the DPL code, I'm guessing this is because the section tag is rendered to an empty string, so when the BeginFoo template is transcluded, the section tag is rendered and not actually present in the calling page.
Workaround
The only workaround I can think of is to call
{{subst:BeginFoo}} Some text. {{subst:EndFoo}}
but that is less than desirable.
--Evan Sultanik 21:16, 25 March 2008 (CET)
Reply
Indeed DPL relies on the fact that the section tag is physically present within the raw wiki text. Maybe DPL could learn to understand someting like {{begin section|Foo}} but I can´t see an advantage in this.
- Gero 21:35, 25 March 2008 (CET)