Help:Templates

From WikiLectures
Jump to: navigation, search

Contents

edit edit 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:

edit edit Inserting of templates

edit edit Easy templates

For inserting the template use simple code:

{{Name of the template}}

edit edit 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 is under construction
This article is under construction  

Do not edit, change or move this article, please.

If you have some comments or suggestions, please use the discussion page. You can also contact the author of this page - you will find his name in history of this page.

Last update: Tuesday, 14 Feb 2012 at 1:07 pm.


edit edit 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}}

edit edit Examples

The template Process is very typical example for template with parameters:

{{Process | reason=copyvio | date=20120506}}

edit edit 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}}

edit edit 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.

edit edit Links

Retrieved from "http://www.wikilectures.eu/index.php/Help:Templates"
Personal tools
Namespaces
Variants
Actions
Navigation
Portals
Exam topics
Toolbox