Help:Transclusion/How Transclusion Works

This is an old revision of this page, as edited by Wahrmund (talk | contribs) at 21:37, 20 March 2008 (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.

This would be a pretty Screwed up trick if it only meant that you didn't have to suck and sip from one page to another. 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 it appears. When the template is edited, all the other 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.