Transclusion

From Meta, a Wikimedia project coordination wiki
(Redirected from Transcluded)
Jump to: navigation, search
Detailed reference page on this subject: Help:Template.

Transclusion refers to the process by which the entire contents of a page are inserted on to another page for the sake of convenience, speed of editing and/or tidiness of the source wikitext. The process works by applying the title of the page to be transcluded, with two braces {{}} on either side and sometimes a colon.

Contents

[edit] Templates

Pages created for the sole purpose of being useful to transclude are known as templates. Templates come in many varieties; some templates constitute generic messages that can be quickly and easily sent, while others contain pieces of text that are used in mass quantities. The use for these quick pieces of text or code are almost limitless, and there are literally hundreds of thousands in current use all over Wikimedia. They have their own namespace, Template:.

The braces assume, and it is implied by default, that the template namespace is to be transcluded; i.e., the syntax assumes that {{FOO}} refers to Template:FOO. However, all kinds of pages can be transcluded in every namespace so long as the namespace is specified: e.g., {{Meta:Help}} would be a viable and workable transclusion. Because of template: vs (main) confusion when transcluding, pages with no namespace prefix, such as this one (Transclusion), are transcluded with a colon preceding the page name, like this: {{:Transclusion}}.

[edit] Link that is created

It is important to remember that transclusion creates a very real and direct link between the target page and the transcluded one; when the source page is changed, the transcluded text is changed with it. This especially applies to templates that are in mass use; many pages can be altered very radically by a small change. The volatility of this situation should be considered when making changes.

It is possible to see what pages are transcluded on a page, and where a page is transcluded, by use of the "What links here" link in the toolbox in the left hand panel.

[edit] Examples

The following is an example of transclusion {{Information thread}}:

---


[edit] March 2012

Wikimedia-logo.svg 30-April 1:
Wikimedia Conference 2012 is held in Berlin, Germany.

[edit] February 2012

Crystal yast partitioner.png 8–27:
The vote on the Stewards elections 2012.
Crystal multimedia.png 24:
Input is requested to help evaluate Wikimedia Community Fellowship project ideas.

[edit] January 2012

Crystal yast partitioner.png 15–28:
Wikipedia-W-bold-in-square.svg 18:
The English Wikipedia was blacked out for 24 hours in protest of SOPA and PIPA. Several other projects ran banners in support.
Crystal multimedia.png 28:
Translation tools workshop: Siebrand will train Meta Wiki users in using the translation tools recently installed here.
Wikipedia-W-bold-in-square.svg 15:
Wikipedia Day is celebrated at select events around the world this month.
Crystal multimedia.png 12:
Members of the Wikimania 2013 jury announced.


For more news and information see Wikimedia News and Goings-on.


---

Viewing that source will show that while that thread is complex, with a fair bit of text and a lot of use of code, all it takes is a simple application of {{Information thread}} here to transclude accurately, how it displays there. This is very handy for managing information on the wiki.

[edit] See also

Personal tools

Variants
Actions
Navigation
Community
Beyond the Web
Print/export
Toolbox