Transclusion

From Meta, a Wikimedia project coordination wiki
(Redirected from Help:Transclusion)
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.

Templates[edit]

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, as this one (Transclusion), are transcluded with a colon preceding the page name, like this: {{:Transclusion}}.

Link that is created[edit]

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.

Examples[edit]

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

---


August 2014[edit]

Wikimedia-logo.svg 28: Wikimedia Foundation calls for suggestions on Media Viewer.
Wikimedia-logo.svg 20: Letter to Wikimedia Foundation: Superprotect and Media Viewer.
Crystal filetypes.png 20: Request for comment: On a scale of billions.
Wikimedia-logo.svg 19: Executive Director's "Working together" statement.
Crystal filetypes.png 19: Brainstorming: Community Engagement (Product)/Process ideas.
Crystal filetypes.png 10: Request for comment: Superprotect rights.
Wikimania.svg 8-10: Wikimania 2014 took place in London.
Crystal filetypes.png 7: Request for comments: Mission(s) policy.

June 2014[edit]

Bulbgraph.svg 19: Proposal to include help pages again in default results on Special:Search.

May 2014[edit]

Crystal filetypes.png 15: Request for comments: How to deal with open datasets.
Wikimedia-logo.svg 1: The Wikimedia Foundation announces its new executive director Lila Tretikov.

April 2014[edit]

Bulbgraph.svg 5: A new proposal is started to launch NonFreeWiki as a Wikimedia project.
Bulbgraph.svg 5: Novi prijedlog je podnešen za pokretanje UserWiki kao novi Wikimedia projekat.

March 2014[edit]

Crystal filetypes.png 12: Request for comments: Wikimedia genealogy project.
Crystal filetypes.png 9: Request for comments: Standardize ProofreadPage namespaces across Wikisources.
Crystal filetypes.png 3: Request for comments: Creation of a Global Wikimedia Commons.
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.

See also[edit]