Help:Transclusion

From MeritBadgeDotOrg

(Difference between revisions)
Jump to: navigation, search
m (Transclusion moved to Help:Transclusion: correct namespace)
Current revision (12:54, January 29, 2012) (edit) (undo)
m (Re-write)
 
(One intermediate revision not shown.)
Line 1: Line 1:
-
Please see [http://en.wikipedia.org/wiki/Wikipedia:Transclusion Wikipedia:Transclusion] for details.
+
'''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 <code>{{}}</code> on either side and sometimes a colon.
-
'''Note to all editors:''' Please utilize transclusion when and where ever it is feasible and appropriate to do so.
+
Transclusion should be used when and where ever it is feasible and possible to do so.
-
[[Category:Administrative Issues]]
+
== 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. 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 '''<nowiki>{{Talk}}</nowiki>''' refers to [[Template:Talk]]. However, all kinds of pages can be transcluded in every namespace so long as the namespace is specified: e.g., '''<nowiki>{{Help:Contents}}</nowiki>''' 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: '''<nowiki>{{:Transclusion}}</nowiki>'''.
 +
 
 +
== 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.
 +
 
 +
'''Note:''' 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.
 +
 
 +
==See also==
 +
* [[Help:Template substitution]] (the opposite of ''transclusion'')
 +
 
 +
===External links===
 +
* http://meta.wikimedia.org/wiki/Transclusion
 +
 
 +
[[Category:Help]]

Current revision

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.

Transclusion should be used when and where ever it is feasible and possible to do so.

Contents

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. 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 {{Talk}} refers to Template:Talk. However, all kinds of pages can be transcluded in every namespace so long as the namespace is specified: e.g., {{Help:Contents}} 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}}.

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.

Note: 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.

See also

External links

Personal tools
language