Transclusion

Transclusion is generally the inclusion of the content of a document into another document by reference. In the Wikipedian context, it is the use of the template functionality of MediaWiki to include the same content in multiple documents without having to edit those documents separately.

Partial transclusion
By using "noinclude", "onlyinclude" and "includeonly" markup, it is possible to transclude part of a page rather than all of it. Such partial transclusions can also be achieved by transcluding from other pages such as subpages.

Transclusion markup

 * onlyinclude. In the source page, add the wiki markup ... around the text to be transcluded, then transclude the whole page; only the text between the tags will be shown in the recipient page.
 * Noinclude. The markup ... do the opposite of onlyinclude: everything will be shown except the text between these tags.

Subpages
One can cut & paste the text to be transcluded into a subpage, then use the name of the subpage in the transclusion template. This approach can only be used with subpages from User, Talk or Wikipedia pages; currently, subpages cannot be created from main article pages.

Example: you want to discuss the deletion and redirecting of Pussycat to Cat. First, create the subpage Talk:Pussycat/Let's delete Pussycat!, write your comment into it, then transclude it in Talk:Pussycat and Talk:Cat using the template   (note the colon before the page name). Comments posted in either talk pages will be shown in both.

Examples
Transclusion/How_Transclusion_Works and Template:POTD are transcluded to this page using and.

Template:Flu and text Spanish flu research are transcluded to Spanish flu using "" and "" respectively. Note that transcluding prose in articles is a debated issue. The alternative is to create a short introduction and link to the prose.

Pages related to MediaWiki transclusion

 * MediaWiki namespace
 * m:Help:MediaWiki namespace
 * m:Help:Variable
 * Wikipedia talk:Template namespace

Templates

 * m:Help:Template
 * Template namespace
 * Template messages
 * Template limits
 * Avoid using meta-templates (rejected)