Difference between revisions of "Help:Layouts"

Line 1: Line 1:
A'' 'layout'', or''template''', is a site which is a text block to be used, ie as a pre-text in another text inserted. These are, for example, [[weapon]] or [[armor]] used.  
+
A '''Layout''' or '''Template''' is a page where text blocks or structures can be used. These are, for example, used for [[Weapon]] or [[Armour]] sets.
  
No Topics == == Rings
+
== No Theme Rings ==
It is forbidden in the German-speaking subjects Metin2Wiki rings, ie combinations of several articles on the same topic to create. Are permitted only navigation bars or other compilations as well as link boxes, a full list of peer elements.
 
  
== Templates ==
 
To create a simple template in an article to use, there are three possibilities:
 
  
# The main application, you add a template with'' '<code> <nowiki> {{title}} </ nowiki> </ code>''' a. When viewing the page replaces the MediaWiki software that then by the content of the presentation of "title". Changes anyone submitting changes to the presentation.
+
It is forbidden in the German-speaking subjects Metin2Wiki rings, ie combinations of several articles on the same topic to create. Are permitted only navigation bars or other compilations as well as link boxes, a full list of peer elements.
# <tt> <nowiki> {{Subst: Title}} </ nowiki> </ tt> also adds the contents of the template, replacing the text directly, but when you save the template. In this way, for example, new users [[Template: hello | welcome]], which are then on their side even when you edit the text to find the welcome and no confusing <tt> {{Template | Hello}} </ tt>. Other templates are designed so that they <tt> <nowiki> with {{subst: Title}} </ nowiki> </ tt> tag, eg the template [[Template: Deletion request | deletion request]].
 
# <tt> <nowiki> Msgnw {{Title}} </ nowiki> </ tt> in the article shows the source code of the template. This feature is rarely, really only to the Declaration of artwork needed.  
 
  
Pages that are not in the template namespace is, you can still be considered a template, if one room with the name indicates. For example, {{<nowiki> Metin2Wiki Guide}} </ nowiki> the page [[Metin2Wiki: Guide]] as a template mount. If a page from the article namespace mount, you have to have a colon before the name: How would <nowiki> {{Test}} </ nowiki>, for example, the article [[Test]] as a template mount.
 
  
=== Conditional inclusion of code blocks ===  
+
== Templates ==
  
The following tags should only be used by the process as a template:  
+
To create a simple template in an article there are three possibilities:
  
; <tt> <nowiki> <onlyinclude> </ Nowiki> </ tt>
+
# In the main application, you add a template with <code><nowiki>{{title}}</nowiki></code> on. When viewing the page MediaWiki will replace the content by adding "title" template.
If the submission is considered directly, have <tt> <nowiki> <onlyinclude> </ nowiki> </ tt> and <tt> <nowiki> </ onlyinclude> </ nowiki> </ tt> no effect at all what stands between them. If the template but on the other side is involved,''only''is displayed, which between <tt> <nowiki> <onlyinclude> </ nowiki> </ tt> and <tt> <nowiki> </ onlyinclude> < / nowiki> </ tt> stands. With <tt> <nowiki> <onlyinclude> </ nowiki> </ tt> to [[# document templates | Documentation]] [[Help: Categories | Category]] and [[Help: Interwiki link | Interwiki links ]] in templates to be inserted without the need for this to appear in the articles. There may be two or more non-nested''''<tt> <nowiki> <onlyinclude> </ nowiki> </ tt> blocks in a template are available.  
+
# <code><nowiki>{{subst:title}}</nowiki></code> also adds the contents of the template, replacing the text directly, but only when you save the template. This, for example, welcomes new users which are then on their page even when you edit the text to find the welcome and no confusing Template: Template.
; <tt> <nowiki> <includeonly> </ Nowiki> </ tt>
+
# <code><nowiki>{{msgnw: title}}</nowiki></code> in the article shows the source code of the template. This feature is rarely used and only used for amendments to a template.
: Everything in a template between <tt> <nowiki> <includeonly> </ nowiki> </ tt> and <tt> <nowiki> </ includeonly> </ nowiki> </ tt>, will only be displayed if the template on the other side involved. With <tt> <nowiki> <includeonly> </ nowiki> </ tt> can be, for example, all pages that contain a certain template to automatically add a category. <tt> <nowiki> <includeonly> </ nowiki> </ tt> can also <tt> <nowiki> <onlyinclude> </ nowiki> </ tt> blocks are available.  
 
; <tt> <nowiki> <noinclude> </ Nowiki> </ tt>
 
: Everything in a template between <tt> <nowiki> <noinclude> </ nowiki> </ tt> and <tt> <nowiki> </ noinclude> </ nowiki> </ tt>, is only then displayed when the template itself is considered. <tt> <nowiki> <onlyinclude> </ nowiki> </ tt> should be to define the actual text of the submission documentation, categories and Interwikilinks to be preferred. <tt> <nowiki> <noinclude> </ nowiki> </ tt> can also <tt> <nowiki> <onlyinclude> </ nowiki> </ tt> blocks are available.  
 
  
== Parameters == insert and use
+
Pages that are not in the Template section can still be used as Templates if they are submitted in the title option. For example, <nowiki>{{Metin2Wiki Guide}}</nowiki> the page Metin2Wiki Guide can be used as a Template. If a page from the article namespace mount, you have to have a colon before the name: This would be <nowiki>{{Test}}</nowiki>, for example, the test article as a template mount.
  
Often be in a template contents appear, however, from page to page, for example a signature or the name of an individual image. This is achieved with parameters.
 
  
In the presentation indicates it through three bodies, curly braces as placeholders, which can either be numbered or through freely chosen names are:
 
  
  <nowiki> According to Wikipedians {{(1}}) this page is copied from {{(2 }}}</ nowiki>
+
== Conditional Inclusion of Code Blocks ==
  <nowiki> According to Wikipedians Wikipedians {{(}}) this page is copied from {{(source }}}</ nowiki>
 
  
A wildcard can also act as Wikilink, if he will have two brackets is surrounded, like <nowiki> [[{{{ 1 }}}]]</ nowiki>.
+
The following tags should only be used by the process as a template:
  
If such a template with parameters, it must be under the name of the template, each separated by a vertical line, and apart from this, the currently selected values:  
+
; <tt><nowiki><onlyinclude></nowiki></tt>
 +
: If the template is considered directly, and have <nowiki><onlyinclude> </onlyinclude></nowiki> no effect on everything that stands in between. If the template but on the other side is involved, will only appear between what <nowiki><onlyinclude></nowiki> and <nowiki></onlyinclude></nowiki> stands. With <nowiki><onlyinclude></nowiki> can documentation, categories and interwiki links in templates are inserted without the need for this to appear in the articles. There may be two or more non-nested <nowiki><onlyinclude></nowiki> blocks are available in a template.
 +
; <tt><nowiki><includeonly></nowiki></tt>
 +
: Everything in a template between <nowiki><includeonly></nowiki> and <nowiki></includeonly></nowiki>, is displayed only if the template on the other side involved. With <nowiki><includeonly></nowiki> can be, for example, all pages that contain a certain template to automatically add a category. <nowiki><includeonly></nowiki> can also be used in stand <nowiki><onlyinclude></nowiki> blocks.
 +
; <tt><nowiki><noinclude></nowiki></tt>
 +
: Everything in a template between <nowiki><noinclude></nowiki> and <nowiki></noinclude></nowiki>, will only be displayed when the template itself is considered. <nowiki><onlyinclude></nowiki> should delimit the actual text of the submission documentation, categories and Interwikilinks to be preferred. <nowiki><noinclude></nowiki> can also be used in stand <nowiki><onlyinclude></nowiki> blocks.
  
  <nowiki> {{title | wikiwichtel | http://www.irgendwo.de/}} </ nowiki>
 
  <nowiki> {{title | Wikipedians wikiwichtel = | source = http://www.irgendwo.de/}} </ nowiki>
 
  
Attention, the first spelling makes the required'' 'only''' if the placeholders in the template are numbered, unless they are freely appointed.
+
== Insert and Use Parameters ==
The second notation is recommended for templates, multiple, slightly confusing parameters.
 
  
If a parameter is not filled with content, so it appears empty.  
+
Often be in a template contents appear, however, from page to page, for example a signature or the name of an individual image. This is achieved with parameters.
  
If a parameter is retrofitted into an existing template is inserted, may need to use the article be amended accordingly. Will do this, then either the default value of the parameter used, or the change has no implications for the Articles.
+
In the presentation indicates it through three bodies, curly braces as placeholders, which can either be numbered or through freely chosen names are:
  
MediaWiki also exist in some pre-defined variables, the parameter values are useful, for example the name of the current page (<tt> <nowiki> {{PAGENAME}} </ nowiki> </ tt>).
+
According to Wikipedians <nowiki>{{{1}}}</nowiki> this page is copied from <nowiki>{{{2}}}</nowiki>
 +
According to Wikipedians <nowiki>{{{}}}</nowiki> this page is copied from <nowiki>{{{source}}}</nowiki>
  
Respect'':''parameters in the MediaWiki namespace are used differently ($ 1, $ 2 ...).  
+
A wildcard can also act as Wikilink, if he will have two brackets is surrounded, like <nowiki>[[{{{ 1 }}}]]</nowiki>.
  
=== Default parameter value defined ===
+
If such a template with parameters, it must be under the name of the template, each separated by a vertical line, and apart from this, the currently selected values:
You can define a parameter so that, for him to use the presentation of no value to be specified. Without this information, then, a pre-defined value used. In a construct such as <nowiki> {{(1 | </ nowiki >'''< nowiki> {{PAGENAME}} </ nowiki >'''< nowiki >}}}</ nowiki> is the first input parameter , otherwise the name of the item. These constructs burdening the server is not as strong as pre-defined parameter values.
 
  
=== Problem: equal sign in the parameter values ===
+
{{Title|wikiwichtel|http://www.irgendwo.de/}}
About Are you a template parameter value as a text, which contains an equal sign, "thinks" the MediaWiki software, it wanted the suspected parameters before the equal sign the value after the equals sign to assign.  
+
{{Title|Wikipedians=wikiwichtel|source=http://www.irgendwo.de/}}
  
This problem occurs for example if you have a URL that contains an equals sign (eg: <nowiki> http://de.wikipedia.org/w/index.php?title=Hilfe: Templates & action = edit & section = 3 </ nowiki>) as a parameter value to a template will pass.  
+
Attention, the first spelling makes the required only if the placeholders in the template are numbered, unless they are freely appointed. The second notation is recommended for templates, multiple, slightly confusing parameters.
  
To circumvent, imagine the parameter value where the "=" occurs when some of <code> n </ code>-te is <code> n = </ code> progressing. (The name of the template remains in the parameter numbering outside.)
+
If a parameter is not filled with content, so it appears empty.
  
(|
+
If a parameter is retrofitted into an existing template is inserted, may need to use the article be amended accordingly. Will do this, then either the default value of the parameter used, or the change has no implications for the Articles.
| List Price:
 
| <code> <nowiki> {{Example Template | http://.../index.php?title=...&action=edit&section=3}} </ nowiki> </ code> <br />
 
| --
 
| Right:
 
| <code> <nowiki> sample template {{| </ nowiki> <span style="color:#0000ff;">'''1 ='''</ span> http://.../ <nowiki> index.php? title =...& action = edit & section = 3}} </ nowiki> </ code>
 
|)
 
  
The same measure should be noted if one parameter value as a "<code> style </ code>" would like to pass: <br />
+
MediaWiki also exist in some pre-defined variables, the parameter values are useful, for example the name of the current page <nowiki>{{{PAGENAME}}}</nowiki>.
(|
 
| List Price:
 
| {{<code> <nowiki> sample template | first parameter | a <span style="font-size:1.5em;"> b </ span> c}} </ nowiki> </ code> <br />
 
| --
 
| Right:
 
| {{<code> <nowiki> sample template | first parameter | </ nowiki> <span style="color:#0000ff;">'''2 ='''</ span> <nowiki> a <span style = "font-size: 1.5em;"> b </ span> c}} </ nowiki> </ code>
 
|)
 
  
=== Problem: Vertical line in parameter values ===
+
''Note:'' parameters in the MediaWiki namespace are used differently ($ 1, $ 2 ...).
Since the character "|" for the separation of parameters is used, it may not even occur in parameter values. It can be obtained by <tt> &#124; </ tt> will be represented, unless it be [[Help: Tables | Table syntax]] in parameter values. There is then the following special templates that are only in parameter values should be used:
 
  
(| Class = "pretty-table
 
! class = "hintergrundfarbe8" | Template
 
| <tt> <nowiki> {{!}}</ Nowiki> </ tt>
 
| <tt> <nowiki> {{!-}}</ Nowiki> </ tt>
 
| <tt> <nowiki> {{!!}}</ Nowiki> </ tt>
 
| <tt> <nowiki> {{!-!}}</ Nowiki> </ tt>
 
| <tt> <nowiki> {{!}}+</ Nowiki> </ tt>
 
| <tt> <nowiki> {{!~}}</ Nowiki> </ tt>
 
| <tt> <nowiki> {{(!}}</ Nowiki> </ tt>
 
| <tt> <nowiki> {{!)}}</ Nowiki> </ tt>
 
| --
 
! class = "hintergrundfarbe8" | Contents
 
| <tt> <nowiki> | </ Nowiki> </ tt>
 
| <tt> <nowiki> | - </ Nowiki> </ tt>
 
| <tt> <nowiki> | | </ Nowiki> </ tt>
 
| <tt> <nowiki> | - </ Nowiki> <br /> <nowiki> | </ nowiki> </ tt>
 
| <tt> <nowiki> | + </ Nowiki> </ tt>
 
| <tt> <nowiki> | - </ Nowiki> <br /> <nowiki> </ nowiki> </ tt>
 
| <tt> <nowiki> (| </ Nowiki> </ tt>
 
| <tt> <nowiki> |) </ Nowiki> </ tt>
 
|)
 
  
A related problem occurs in the curly brackets "<nowiki> {{</ nowiki>" and "<nowiki>}} </ nowiki>" on. If these strings enter, then the interpreter tries the intervening text to worse or deterioration as a template to interpret. The following templates can be achieved through related queries that only need the interpreter to make substitutions, so it eliminates unnecessary cascades. These templates will only in parameter values are:
 
  
(| Class = "pretty-table
+
== Default Parameter Value Defined ==
! class = "hintergrundfarbe8" | Template
 
| <tt> <nowiki> {{{{}}</ Nowiki> </ tt>
 
| <tt> <nowiki> {{}}}}</ Nowiki> </ tt>
 
| --
 
! class = "hintergrundfarbe8" | Contents
 
| <tt> <nowiki> {{</ Nowiki> </ tt>
 
| <tt> <nowiki>}} </ Nowiki> </ tt>
 
|)
 
  
For representation of curly brackets simply can <tt> &#123; </ tt> for (and <tt> &#125; </ tt>) to be used. A more readable version is the text in <tt> <nowiki> </ tt> tags einzufassen if nothing is used as a template to be interpreted.  
+
 +
You can define a parameter so that, for him to use the presentation of no value to be specified. Without this information, then, a pre-defined value used. With a construct like {{{1|{{PAGENAME}}}}} entered, the first parameter, otherwise the name of the item. These constructs burdening the server is not as strong as pre-defined parameter values.
  
{{AusWP
+
 
| 1 = http://de.wikipedia.org/wiki/Hilfe:Vorlagen}}  
+
== Problem: Equal Sign in the Parameter Values ==
[[Category: Help]]
+
Are you a template parameter value as a text, which contains an equal sign, "thinks" the MediaWiki software, it wanted the suspected parameters before the equal sign the value after the equals sign to assign.
 +
 
 +
This problem occurs for example if you have a URL that contains an equals sign (eg: http://de.wikipedia.org/w/index.php?title=Hilfe:Vorlagen&action=edit&section=3) as a parameter value to a template will pass.
 +
 
 +
To circumvent, imagine the parameter value where the "=" occurs when some of the n-th is, n = progress. (The name of the template remains in the parameter numbering outside.)
 +
Instead of: <code><nowiki>{{ExampleTemplate|http://.../index.php?title=...&action=edit&section=3}}</nowiki></code>
 +
Correct: <code><nowiki>{{ExampleTemplate|1=http://.../index.php?title=...&action=edit&section=3}}</nowiki></code>
 +
 
 +
The same measure should be noted if one parameter value as a "style" would like to pass:
 +
Instead of: <code><nowiki>{{ExampleTemplate|first parameter|a<span style="font-size:1.5em;">b</span>c}}</nowiki></code>
 +
Correct: <code><nowiki>{{ExampleTemplate| first parameter|2=a<span style="font-size:1.5em;">b</span>c}}</nowiki></code>
 +
 
 +
 
 +
== Problem: Vertical line in parameter values ==
 +
 
 +
 +
Since the character "|" for the separation of parameters is used, it may not even occur in parameter values. It may | be represented, unless you want table syntax in parameter values. There is then the following special templates that are only in parameter values should be used:
 +
Template <nowiki>{{!}}</nowiki> <nowiki>{{!-}}</nowiki> <nowiki>{{!!}}</nowiki> <nowiki>{{!-!}}</nowiki> <nowiki>{{!}}+ {{!~}}</nowiki> <nowiki>{{(!}} {{!)}}</nowiki>
 +
Contents <nowiki>| | - | | | --
 +
| | + | --
 +
! (| |)</nowiki>
 +
 
 +
A related problem occurs in the curly brackets "<nowiki>{{</nowiki>" and "<nowiki>}}</nowiki>" on. If these strings enter, then the interpreter tries the intervening text to worse or deterioration as a template to interpret. The following templates can be achieved through related queries that only need the interpreter to make substitutions, so it eliminates unnecessary cascades. These templates will only in parameter values are:
 +
Template <nowiki>{{((}} {{))}}</nowiki>
 +
Content <nowiki>{{ }}</nowiki>
 +
 
 +
For easy presentation of curly brackets for the <nowiki>{{and}}</nowiki> are used for. A more readable version is the text in <nowiki><nowiki></nowiki>-tags einzufassen if nothing is used as a template to be interpreted.

Revision as of 19:46, 7 May 2009

A Layout or Template is a page where text blocks or structures can be used. These are, for example, used for Weapon or Armour sets.

No Theme Rings

It is forbidden in the German-speaking subjects Metin2Wiki rings, ie combinations of several articles on the same topic to create. Are permitted only navigation bars or other compilations as well as link boxes, a full list of peer elements.


Templates

To create a simple template in an article there are three possibilities:

  1. In the main application, you add a template with {{title}} on. When viewing the page MediaWiki will replace the content by adding "title" template.
  2. {{subst:title}} also adds the contents of the template, replacing the text directly, but only when you save the template. This, for example, welcomes new users which are then on their page even when you edit the text to find the welcome and no confusing Template: Template.
  3. {{msgnw: title}} in the article shows the source code of the template. This feature is rarely used and only used for amendments to a template.

Pages that are not in the Template section can still be used as Templates if they are submitted in the title option. For example, {{Metin2Wiki Guide}} the page Metin2Wiki Guide can be used as a Template. If a page from the article namespace mount, you have to have a colon before the name: This would be {{Test}}, for example, the test article as a template mount.


Conditional Inclusion of Code Blocks

The following tags should only be used by the process as a template:

<onlyinclude>
If the template is considered directly, and have <onlyinclude> </onlyinclude> no effect on everything that stands in between. If the template but on the other side is involved, will only appear between what <onlyinclude> and </onlyinclude> stands. With <onlyinclude> can documentation, categories and interwiki links in templates are inserted without the need for this to appear in the articles. There may be two or more non-nested <onlyinclude> blocks are available in a template.
<includeonly>
Everything in a template between <includeonly> and </includeonly>, is displayed only if the template on the other side involved. With <includeonly> can be, for example, all pages that contain a certain template to automatically add a category. <includeonly> can also be used in stand <onlyinclude> blocks.
<noinclude>
Everything in a template between <noinclude> and </noinclude>, will only be displayed when the template itself is considered. <onlyinclude> should delimit the actual text of the submission documentation, categories and Interwikilinks to be preferred. <noinclude> can also be used in stand <onlyinclude> blocks.


Insert and Use Parameters

Often be in a template contents appear, however, from page to page, for example a signature or the name of an individual image. This is achieved with parameters.

In the presentation indicates it through three bodies, curly braces as placeholders, which can either be numbered or through freely chosen names are:

According to Wikipedians {{{1}}} this page is copied from {{{2}}}
According to Wikipedians {{{}}} this page is copied from {{{source}}}

A wildcard can also act as Wikilink, if he will have two brackets is surrounded, like [[{{{ 1 }}}]].

If such a template with parameters, it must be under the name of the template, each separated by a vertical line, and apart from this, the currently selected values:

Template:Title
Template:Title

Attention, the first spelling makes the required only if the placeholders in the template are numbered, unless they are freely appointed. The second notation is recommended for templates, multiple, slightly confusing parameters.

If a parameter is not filled with content, so it appears empty.

If a parameter is retrofitted into an existing template is inserted, may need to use the article be amended accordingly. Will do this, then either the default value of the parameter used, or the change has no implications for the Articles.

MediaWiki also exist in some pre-defined variables, the parameter values are useful, for example the name of the current page {{{PAGENAME}}}.

Note: parameters in the MediaWiki namespace are used differently ($ 1, $ 2 ...).


Default Parameter Value Defined

You can define a parameter so that, for him to use the presentation of no value to be specified. Without this information, then, a pre-defined value used. With a construct like Layouts entered, the first parameter, otherwise the name of the item. These constructs burdening the server is not as strong as pre-defined parameter values.


Problem: Equal Sign in the Parameter Values

Are you a template parameter value as a text, which contains an equal sign, "thinks" the MediaWiki software, it wanted the suspected parameters before the equal sign the value after the equals sign to assign.

This problem occurs for example if you have a URL that contains an equals sign (eg: http://de.wikipedia.org/w/index.php?title=Hilfe:Vorlagen&action=edit&section=3) as a parameter value to a template will pass.

To circumvent, imagine the parameter value where the "=" occurs when some of the n-th is, n = progress. (The name of the template remains in the parameter numbering outside.) Instead of: {{ExampleTemplate|http://.../index.php?title=...&action=edit&section=3}} Correct: {{ExampleTemplate|1=http://.../index.php?title=...&action=edit&section=3}}

The same measure should be noted if one parameter value as a "style" would like to pass: Instead of: {{ExampleTemplate|first parameter|a<span style="font-size:1.5em;">b</span>c}} Correct: {{ExampleTemplate| first parameter|2=a<span style="font-size:1.5em;">b</span>c}}


Problem: Vertical line in parameter values

Since the character "|" for the separation of parameters is used, it may not even occur in parameter values. It may | be represented, unless you want table syntax in parameter values. There is then the following special templates that are only in parameter values should be used: Template {{!}} {{!-}} {{!!}} {{!-!}} {{!}}+ {{!~}} {{(!}} {{!)}} Contents | | - | | | -- | | + | -- ! (| |)

A related problem occurs in the curly brackets "{{" and "}}" on. If these strings enter, then the interpreter tries the intervening text to worse or deterioration as a template to interpret. The following templates can be achieved through related queries that only need the interpreter to make substitutions, so it eliminates unnecessary cascades. These templates will only in parameter values are: Template {{((}} {{))}} Content {{ }}

For easy presentation of curly brackets for the {{and}} are used for. A more readable version is the text in <nowiki>-tags einzufassen if nothing is used as a template to be interpreted.