ਮਦਦ:A quick guide to templates
From Wikipedia, the free encyclopedia
This is a quick overview of templates. Full details can be found in Help:Template and m:Help:Advanced templates.
This essay is a how-to guide detailing process on some aspect or aspects of Wikipedia's norms and practices. It is not one of Wikipedia's policies or guidelines; where something is inconsistent with this page, please defer to those. |
Templates are pages in the template namespace. This means any page whose title begins with "Template:", such as "Template:foo", can be used as a template. The content of a template titled Template:templatename, can be added to a page by typing {{templatename}}
while editing the page. When the page is later viewed, {{templatename}}
is replaced by the content of the page "Template:templatename". If the page "Template:templatename" is later altered, all the pages with {{templatename}}
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 will be transcluded onto the "Template:foo" page).