Help:A quick guide to templates

This is a quick overview of templates. Full details can be found in Help:Template, Wikipedia:Templates and m:Help:Advanced templates.

A template is a Wikipedia page created to be included in other pages. It usually contains repetitive material that may need to show up on multiple articles or pages, often with customizable input. Templates sometimes use MediaWiki parser functions, nicknamed "magic words", a simple scripting language.

Template pages are found in the template namespace. This means any page whose title begins with "Template:", such as "Template:foo", can be used for that purpose. The content from a template titled Template:foo can be added into a Wikipedia page by editing a page and typing {{foo}} into it. When then viewing the page, {{foo}} is automatically replaced by the content of the page "Template:foo". If the page "Template:foo" is later altered, all the pages with {{foo}} in them will change automatically.

Among other things, templates are used to add recurring messages to pages in a consistent way, to add boilerplate messages, and to create navigational boxes.

When a template is automatically expanded and appears on a page, it is said to be "transcluded".

Templates are documented (or should be) at their pages. Thus if you want to know how to use a template whose name is "foo" (perhaps because you've seen {{foo|...}} in the source of an article), then go to "Template:foo". (The documentation itself will usually be located at "Template:foo/doc", but is also transcluded onto the "Template:foo" main page).


From Wikipedia, the free encyclopedia · View on Wikipedia

Developed by Nelliwinne