Template:Section transclude/doc

From English Wikipedia @ Freddythechick

This is the current revision of this page, as edited by imported>Me, Myself, and I are Here at 00:12, 27 January 2024 (→‎See also: dash). The present address (URL) is a permanent link to this version.

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

__EXPECTUNUSEDTEMPLATE__

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 maintained in one place.

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

Example

Code

<syntaxhighlight lang="wikitext"> <section begin=lorem/>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.<section end=lorem/>

...

{{#section:Template:Section transclude/doc|lorem}} </syntaxhighlight>

Output

<section begin=lorem/>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.<section end=lorem/>

...

{{#section:Template:Section transclude/doc|lorem}}

See also