Page MenuHomePhabricator

Enhancing LST to allow transcluding section tags
Open, Needs TriagePublic


Labeled Section Transclusion currently only sees section tags that appear directly in the wikitext of the transcluded page:
With a view to customization and cleaner wikitext, especially if the same kind of labeled section has to be created on different pages (and perhaps with some additional mark-up or surrounding text) it would be desirable to embed the section tags in a template.
To give an example, this would allow cross-page variables (now only covered by the experimental PageVariable extension) by creating a template that creates a variable (hidden labeled section) and one that retrieves its value (#lst parser function).

Ideas for implementation

Having LST go through all transcluded templates looking for section tags would be an expensive operation, and could possibly even lead to name conflicts, depending how LST is currently used on wikis. I see two other options: (1) create a transclusion modifier that tells LST there might be section tags in the (partially) transcluded page, or (2) create a second parser function that does go through all templates.
With the cross-page variables example in mind, (1) seems most interesting.

Related: T39256

Related Objects

Event Timeline

barto created this task.Nov 1 2017, 12:03 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptNov 1 2017, 12:03 PM
barto updated the task description. (Show Details)Nov 1 2017, 12:05 PM
barto updated the task description. (Show Details)Nov 1 2017, 1:21 PM
barto added a comment.Nov 18 2017, 4:17 PM

Not surprisingly, this has been brought up several times. On the talk page of LST:
For <ref>, the similar problem was resolved in T8312
Being able to transclude <section> tags would dramatically upgrade the functionality of LST! It just seems nobody has had the time to look into it.

Magol added a subscriber: Magol.May 17 2018, 12:17 PM
FDMS added a subscriber: FDMS.Sep 14 2018, 6:32 PM