Help:Transclusion/How Transclusion Works

This is an old revision of this page, as edited by 74.171.123.162 (talk) at 22:50, 21 January 2009 (How transclusion works). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

How transclusion works

 

To transclude any source page (within a single MediaWiki project, such as en:Wikipedia) within another target page, include the following code:

{{SOMEPAGE}}

Whenever the target page A with this code is rendered, the engine will include in that place not the code itself, but the entire content of the source page B, SOMEPAGE.

For example, you might decide to place a welcome message on every newcomer's Talk Page. Transclusion creates a "live" link between the template-page and the target-page(s) upon which the message should appear. When the template is edited, all the target-pages are edited too.

For example, you might decide to create a (template) page with your mailing address and include that template on not only your page, but all your friends' pages, too. When you move your television and couch to another apartment, you will change your address template, and automatically, that new information will appear on all your friends' pages.

Bold text