Help:Templates
About templates
The templates are special pages which can be inserted into articles. And it can be used very easily! Just insert very simple command. Templates can be used to insert:
- technical or organization information – there is a very useful template {{Under construction}} – this template should be inserted in the beginning of the article in case, that your article has not been finished yet and you would like to continue few days later. (It will automatically inserted by saving the article as a draft.) Or the article has been finished, but does not contain all the information, which are needed – then the template {{Stub}} should be inserted in the end of the article.
- text from another article – inserts text from another article to your article.
Inserting of templates
Easy templates
For inserting the template use simple code:
{{Name of the template}}
Example
The template {{Under construction}} is very typical example for easy template:
{{Under construction}}
You will create little border with warning message on the beginning of your article:
This article was marked by its author as Under construction, but the last edit is older than 30 days. If you want to edit this page, please try to contact its author first (you fill find him in the history). Watch the discussion as well. If the author will not continue in work, remove the template Last update: Monday, 25 Jul 2011 at 11.14 am. |
Templates with parameters
There are some templates where is needed to use other parameters which are divided by vertical bar: |. The other parameters are very useful for specification of the template:
{{Name of the template | parametr1 | parametr2}}
Examples
The template Process is very typical example for template with parameters:
{{Process | reason=copyvio | date=20120506}}
Inserting articles
Every article which currently exist can be used as template! You can insert it in another article, or you can fuse several articles into one article. In this case you will use similar code:
{{Edit article|Name_of_article}}{{:Name of article}}
You need to insert only a part of the article
Sometimes you need to insert only a part of the article, not whole article. Then you have to mark text, you do not want to choose. Edit the article, you want to insert, and in the beginning of the text you do not want to choose insert <noinclude>
and in the end of this text insert </noinclude>
. The text marked by this command will stay in this original article, but will not be used in your article.
This command is usually used for the reference list.
If you need to mark the text, you want to insert, you have to use very similar command. The beginning of the text mark by command <includeonly>
and its end </includeonly>
. Then only this part of the text will be used in your article.
Example:
== Car == Car is a vehicle. <noinclude> == Reference list == The world of cars, 2009 </noinclude>
Every article, which is inserted in another article should by protected by template {{Inserted article}}. This template should be inserted in the beginning of this article and contains the warning note about editing of this article.