Шаблон:My

Материал из Guild Wars 2 wiki
Перейти к: навигация, поиск

Description

{{ My | term | default }}

Look up the local definition of 'term'

Parameters

term
Required positional parameter. The word or phrase to be looked up. No default provided.
default
Optional positional parameter. Passed to the definition page where is will usually serve as a default value.
page
Optional keyword parameter. The page containing the definition. Defaults to {{FULLPAGENAME}}/my defs

Sub-page format

The sub-page must contain a template that is basically a {{ #switch: ... }}:

{{ #switch: {{{1}}}
| term = definition
...
}}<noinclude>

This page contains the local definitions used by {{NAMESPACE}}:{{BASEPAGENAME}}.

</noinclude>

or, if you want the definition to displayed neatly when examining the page:

<noinclude>&#x7B;&#x7B;</noinclude><includeonly>{{</includeonly> #switch: {{{1}}}
<noinclude><br></noinclude>| term = definition
<noinclude><br></noinclude>...
<noinclude><br></noinclude><includeonly>}}</includeonly><noinclude>&#x7D;&#x7D;

This page contains the local definitions used by {{NAMESPACE}}:{{BASEPAGENAME}}.

</noinclude>

If the definitions have default values, use:

{{ #switch: {{{1}}}
| term = definition
...
| #default = {{ #if {{{2|}}} | {{{2}}} }}
}}<noinclude>

This page contains the local definitions used by {{NAMESPACE}}:{{BASEPAGENAME}}.

</noinclude>

or, if you want the definition to displayed neatly when examining the page:

<noinclude>&#x7B;&#x7B;</noinclude><includeonly>{{</includeonly> #switch: {{{1}}}
<noinclude><br></noinclude>| term = definition
<noinclude><br></noinclude>...
<noinclude><br></noinclude>| #default = <noinclude>{{{</noinclude><includeonly>{{{</includeonly>2|}}}
<noinclude><br></noinclude>}}</includeonly><noinclude>

This page contains the local definitions used by {{NAMESPACE}}:{{BASEPAGENAME}}.

</noinclude>

Examples

{{ My | term }}

definition

{{ My | undefined | default }}

default

x{{ My | nothing }}x

xx

{{ My | term | page={{FULLPAGENAME}}/local defs}}

some other definition

{{ My | term | default | page={{FULLPAGENAME}}/no such page}}

default