finiki:Template namespace
This article is incomplete. Please help to improve the article, or discuss the issue on the talk page. |
This page in a nutshell:
|
Basic namespaces | Talk namespaces | ||
---|---|---|---|
0 | (Main/Article) | Talk | 1 |
2 | User | User talk | 3 |
4 | finiki | finiki talk | 5 |
6 | File | File talk | 7 |
8 | MediaWiki | MediaWiki talk | 9 |
10 | Template | Template talk | 11 |
12 | Help | Help talk | 13 |
14 | Category | Category talk | 15 |
274 | Widget | Widget talk | 275 |
828 | Module | Module talk | 829 |
Virtual namespaces | |||
-1 | Special | ||
-2 | Media |
finiki:Template messages (Changes) contains an index of the most commonly used templates.
Introduction
Templates often look like text boxes with a different background color from that of normal text. They are in the template namespace, i.e. they are defined in pages with "Template:" in front of the name.
For example, consider the template Template:Cleanup (follow the link to see the page where it can be edited). To insert the template's content into an article, type {{Cleanup}}
in the wiki page ("{{Cleanup}}" is called a template tag). Every article with that tag in it will display the following text:
This article may require general cleanup to increase readability, focus, or overall clarity. Please improve this article if you can, or talk about solutions on the discussion page. |
This technique is commonly known as translusion. Templates can also include calculated and substituted elements, as well as parameters, allowing for complex usage. For a table of some useful templates, see finiki:Template messages.
Usage in discussions
Sometimes you will want to refer to a template, rather than actually invoking it. An easy way to do this is to use the "template link" template, Template:Tl. So to discuss the CleanupNeeded template rather than insert the template itself, typing "{{Tl|CleanupNeeded}}" yields the result "{{CleanupNeeded}}". This notation makes clear that you are discussing a template and gives a link to the template itself.
To include parameters in a template, use Template:Tlx, for example, {{tlx|convert|1|m}} yields the result "{{convert|1|m}}
".