The ''content'' of the template is stored in the same-named page in the '''Template:''' [[Project:Namespace|namespace]], which would be linked to using the following "double-square-brackets" syntax:

The ''content'' of the template is stored in the same-named page in the '''Template:''' [[Project:Namespace|namespace]], which would be linked to using the following "double-square-brackets" syntax:

: <tt><nowiki>[[Template:</nowiki>''Name of template'']]</tt>

: <tt><nowiki>[[Template:</nowiki>''Name of template'']]</tt>

−

The two forms differ in that the former results in the substitution (or "transclusion") of the ''contents of'' the template page at that point in the current page (where <nowiki>{{...}}</nowiki> appears), whereas the latter simply ''links to'' the page.

+

The two forms differ in that the former results in the substitution (or "transclusion") of the ''contents of'' the template page at that point in the current page (where {{t|...}} appears), whereas the latter simply ''links to'' the page.

== Wiki markup for templates ==

== Wiki markup for templates ==

Revision as of 19:24, 10 October 2007

Templates are reusable portions of text and/or wiki markup that can be "included" in other pages by using the "double-braces" wiki syntax:

{{Name of template}}

The name of the template can have spaces (you don't have to replace them by _underscores_); the first letter is case insensitive (it can be capital or lower-case), but subsequent letters are case sensitive.

The content of the template is stored in the same-named page in the Template:namespace, which would be linked to using the following "double-square-brackets" syntax:

[[Template:Name of template]]

The two forms differ in that the former results in the substitution (or "transclusion") of the contents of the template page at that point in the current page (where {{...}} appears), whereas the latter simply links to the page.

Navigational templates

Templates whose function is to interlink closely related articles.

(Note: Since the purpose is always the same, there is no "Purpose" column in this table. Also, since it's usually not a good idea to "auto-categorize" articles using templates such as these — i.e., by including the Category: link in the template itself — the "Category" column has been replaced by "Main article".)