Help:Labeled section transclusion

Labeled Section Transclusion (LST) is a parser function that provides two ways for designating a "section" of a page for transclusion. The first method identifies the section by using the page name and a heading (the section title as it appears in the source page). The second method allows the selection of an arbitrary "section" for transclusion, but this approach requires adding specific markup to label the desired section beforehand.

Three functions can transclude a section from a given page name.

  • {{#section:page name|label}} (a labeled section)
  • {{#section-x:page name|label}} (all except that labeled section)
  • {{#section-h:page name|heading}} (a normal section)

Note that there are also equivalent names for these functions, the base names being #lst, #lstx, and #lsth.

To prepare an arbitrary "section" for a labeled section transclusion, mark it with begin and end attributes inside <section /> tags that contain your label:

<section begin=label /> and <section end=label />

Compared to LST transclusion, partial transclusion markup cannot be labeled, and thus the source page cannot have one set of its sections transcluded to one page while having also a different set for another page. A page marked up with partial transclusion tags only, will always transclude the same. But LST and partial transclusion can work together on the same page.

These LST functions take additional parameters, as explained below. § Example pages provides search links for the articles that currently employ LST so you can see how they are using it.