Help:Templates

A template is a piece of text (including tables, pictures, and code) that can be included into other pages. This allows that text to be edited in one place and then updated on many pages at once.

A template is any page in the template namespace, which means any page beginning with "Template:", such as Template:Templatename.

Using Templates
The content of a template can be added to a page by typing. That immediately displays the current contents of the template page, and it updates when the template is changed. Editing the rendered page will show only the template name -- the actual content of the template cannot be edited from there.

Substituting Templates
A different way to use a template, better in some circumstances, is to substitute the template into another page, by inserting "subst:" right after the opening brackets:. This actually copies the template's content onto the rendered page, instead of merely displaying it there. Once the page is saved, the link to the template is broken and the content can be edited from the page as normal. Any further updates to the template text will not affect the content that was copied onto the page.

Reasons for Using Templates
Templates are used to add recurring messages to pages in a consistent way, to add boilerplate messages, to create infoboxes and navigational boxes, and to provide cross-language portability of texts.

Templates can also make it much easier for new and casual editors to use advanced designs, features and extensions by hiding confusing code.

Creating a Basic Template
In short, create the text you want to have copied onto the target pages on a page in the Template namespace. Creating Template:Templatename will allow users to insert into a page to display your text.

See Help:Creating templates for details.

For an overview, see the quick guide to templates on Wikimedia's Meta-Wiki.

Creating an Advanced Template
To learn how to change the output of the template based on what the user inputs, see Help:Template parameters and Help:Parser functions.

de:Hilfe:Vorlagen