Jump to content

Template:Section transclude/doc

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Swpb (talk | contribs) at 18:56, 4 January 2019 (Code). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Transcludes a specified labelled section of the current page. This allows the same content to be used in multiple places in the page, while only needing to be updated in one place.

Will not work on sub-pages (pages with a slash "/" in the title).

Example

Code

<includeonly>
<section begin=number/>seven<section end=number/>       <!--Section to be transcluded-->
</includeonly>

As I was going to St. Ives, I met a man with {{st|number}} wives. Every wife had {{st|number}} sacks, every sack had {{st|number}} cats, every cat had {{st|number}} kitts. Kitts, cats, sacks, wives, how many were going to St. Ives?

Output

As I was going to St. Ives, I met a man with seven wives. Every wife had seven sacks, every sack had seven cats, every cat had seven kitts. Kitts, cats, sacks, wives, how many were going to St. Ives?