If the template's page name does not begin with a namespace, it is assumed to be in the Template namespace. To refer to a page in the "Main" (article) namespace, it is necessary to prefix it with a colon (:). Examples:
{{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.
There are further simple examples at .
The most common application of transclusion is the transclusion of templates. Templates are pages that are written with the prime objective of being included in other pages, either through transclusion or substitution. As shown above, the usual syntax for transcluding a template titled Template:Pagename is {{Pagename}}
. However, some templates can also use parameters. Parameters are values (also termed arguments) that can be passed on to certain templates in order for them to work in different ways. Templates can either use no parameters, a fixed number of parameters, or a variable number of parameters. The number of parameters a template can use is from one upwards.
The exact syntax for using parameters with templates can vary greatly, depending on the actual template being used. But, for an example template titled Template:Pagename, which happened to use three parameters, the general form would be:
{{Pagename|parameter1|parameter2|parameter3}}
with each parameter being substituted with an actual value, or a parameter name=actual value, when used in practice. Notice that each parameter is separated with a vertical bar. Parameters that take the form value
are called unnamed or positional parameters. Parameters that take the form name=value
are called named parameters. With unnamed parameters, the first, second, third etc. parameters are equivalent to parameters '1', '2', '3' etc. in template documentation. Unnamed parameters must be in the correct order, and should come before any named parameters. An example of the syntax using the :