Help:Transclusion

Transclusion refers to the inclusion of the content from one document within another document by reference. In Wikipedia, transclusion means the MediaWiki software retrieving the content from a source page, often a template, and incorporating it into the content of a target page.

Similar to creating a wikilink using double square brackets ([[Pagename]]), a page can be transcluded as a template by enclosing its title in double curly braces or double curly brackets: {{Namespace:Pagename}}. Any changes made to the source page, or template, are automatically reflected on all pages that include the transcluded content.[a]

If no namespace is specified, it is assumed to be in the Template namespace. To refer to a page in the Main article namespace, it is necessary to prefix it with a colon (:). For example:

Transclusion and what content it includes or excludes can be modified by using the invisible wikitext tags <noinclude>, <onlyinclude>, <includeonly>, and <section> on the source page, as further outlined in § Transclusion markup.[b] The first three tags enable § Partial transclusion, as opposed to the default behavior of double curly braces, which will transclude the entire source page's content. For § Selective transclusion, the <includeonly> or <section> tags can be used and sections of the source page named, then using parser functions the template can be called with the section name as a parameter: {{#section:Pagename|Sectionname}}.

Transclusion events occur each time the target page is loaded and the template is rendered. A related event is Substitution, where a template call is replaced with its transcluded source content at the time it is invoked in a one-time inclusion of the content. Unlike transclusion, which continuously updates the target page with changes from the source, substitution results in a one-time inclusion of the content, meaning that subsequent updates to the source content will not be reflected in the target page. For example, a template call for {{Pagename}} with the subst: prefix results in the substitution template call {{subst:Pagename}}. When invoked, this template is replaced, also referred to as substituted, with the actual wikitext of the source page at the time of the call, thereby making it a permanent part of the target page.[c]

It is possible to transclude content from Wikidata into Wikipedia articles or other wikis.
Cite error: There are <ref group=lower-alpha> tags or {{efn}} templates on this page, but the references will not show without a {{reflist|group=lower-alpha}} template or {{notelist}} template (see the help page).


From Wikipedia, the free encyclopedia · View on Wikipedia

Developed by Nelliwinne