Шаблон:Trait list by property — различия между версиями
Материал из Guild Wars 2 wiki
Blood (обсуждение | вклад) |
Blood (обсуждение | вклад) |
||
Строка 1: | Строка 1: | ||
− | <includeonly>{{#vardefine:last_line|}}<!-- purge last line from previous template | + | <includeonly>{{#vardefine:last_line|}}{{#vardefine:last_profession|}}{{#vardefine:tlbp cnt|{{#expr:{{#var:tlbp cnt|0}}+1}}}}<!-- purge last line/profession from previous template call, define unique id variable |
-->{{#vardefine: smw-empty-query-warning|{{#ifeq: {{{warning|true}}}|false|<!-- no warning -->|{{#if: {{NAMESPACE}}||[[Category:Pages with empty semantic mediawiki query results]]}}}}}}<!-- | -->{{#vardefine: smw-empty-query-warning|{{#ifeq: {{{warning|true}}}|false|<!-- no warning -->|{{#if: {{NAMESPACE}}||[[Category:Pages with empty semantic mediawiki query results]]}}}}}}<!-- | ||
Строка 13: | Строка 13: | ||
| ?Is in trait line.Has game icon <!-- 9 --> | | ?Is in trait line.Has game icon <!-- 9 --> | ||
| format = template | | format = template | ||
− | | template = Trait list by property result format{{ | + | | template = Trait list by property result format{{#ifeq: {{{mode|plain}}}|heading|/heading}}{{!}}suffix={{{suffix|description}}}{{!}}heading level={{{heading level|h3}}} |
− | | intro = {{{intro|}}} | + | | intro = {{{intro|}}}{{#ifeq: {{{mode|plain}}}|plain|{{#if: {{{heading|}}}|<nowiki/> |
+ | <div id="{{{id|traitlist}}}"><{{{heading level|h3}}} class="filter-plain {{#var_final: p-tlbp-{{#var:tlbp cnt}} }} f-TLBP">{{{heading|}}}</{{{heading level|h3}}}></div>}}<ul id="{{{id|traitlist}}}" style="margin-top:0em;">}} | ||
+ | | outro = {{#ifeq: {{{mode|plain}}}|plain|</ul>}} | ||
| link = none | | link = none | ||
| sort = Has profession sort order, Has specialization sort order, Has trait line number, Has trait tier number, Has trait type number, Has trait position number, | | sort = Has profession sort order, Has specialization sort order, Has trait line number, Has trait tier number, Has trait type number, Has trait position number, | ||
Строка 21: | Строка 23: | ||
| default = {{{default|* ''No traits found.''{{#var:smw-empty-query-warning}}}}} | | default = {{{default|* ''No traits found.''{{#var:smw-empty-query-warning}}}}} | ||
}}</includeonly><noinclude> | }}</includeonly><noinclude> | ||
+ | {{TOC|class=toc3}} | ||
== Description == | == Description == | ||
− | This template returns a list of traits of a certain semantic mediawiki trait property. Format using {{tl|Trait list by property result format}}. | + | This template returns a list of traits of a certain semantic mediawiki trait property. Format using {{tl|Trait list by property result format}} and {{tl|Trait list by property result format/heading}} (for "mode=heading"). |
;Related templates | ;Related templates | ||
Строка 61: | Строка 64: | ||
;mode | ;mode | ||
: Optional. Either "plain" (default) or "heading" (displays trait line headings and omits the profession, intended for trait pages only). | : Optional. Either "plain" (default) or "heading" (displays trait line headings and omits the profession, intended for trait pages only). | ||
+ | ;heading | ||
+ | : Optional. Intro heading for plain format only. This will internally set filter classes for {{tl|related traits filter}}. | ||
;heading level | ;heading level | ||
− | : Optional. | + | : Optional. Intro heading level, defaults to h3. |
;intro | ;intro | ||
: Optional. Intro text. | : Optional. Intro text. |
Текущая версия на 11:18, 15 апреля 2022
Description[править]
This template returns a list of traits of a certain semantic mediawiki trait property. Format using {{Trait list by property result format}} and {{Trait list by property result format/heading}} (for "mode=heading").
- Related templates
Usage | Skill templates | Trait templates | Description |
---|---|---|---|
Section | {{Related skills}} | {{Related traits}} | These templates list all related skills/traits based on {{skill fact}} and on the {{trait infobox}} improves parameters. They create subsection headings automatically. |
Subsection | {{Skill list}} | {{Trait list}} | These templates list all related skills of a certain context (e.g. weapon, utility)/traits based on {{skill fact}} |
{{Skill list by property}} | {{Trait list by property}} | These templates list all related skills/traits based on a smw query, e.g. based on the {{trait infobox}} improves parameters. | |
Inline | — | {{Trait list entry}} | This template displays the profession icon, trait icon, trait, trait line and trait description. |
Usage[править]
{{Trait list by property|<query>}}
Parameters[править]
- 1 (unnamed parameter)
- Required. Query to select the traits.
- suffix
- Optional. Either "none" or "description" (default).
- mode
- Optional. Either "plain" (default) or "heading" (displays trait line headings and omits the profession, intended for trait pages only).
- heading
- Optional. Intro heading for plain format only. This will internally set filter classes for {{related traits filter}}.
- heading level
- Optional. Intro heading level, defaults to h3.
- intro
- Optional. Intro text.
- default
- Optional. Default text.
Example[править]
mode = plain[править]
{{Trait list by property|[[Has trait tier::Proficiency]]}}
- Sword Proficiency (Волеборец) — Вы можете использовать меч в любой руке.
- Greatsword Proficiency (Поборник) — Вы можете использовать двуручный меч.
- Pistol Proficiency (Клинковед) — Вы можете использовать пистолет в левой руке.
- Mace Proficiency (Механист) — Вы можете использовать булаву в правой руке.
- Scepter Proficiency (Призрак) — Вы можете использовать скипетр в правой руке.
- Hammer Proficiency (Катализатор) — Вы можете использовать молот.
- Dagger Proficiency (Виртуоз) — Вы можете использовать кинжал в правой руке.
- Pistol Proficiency (Предвестник) — Вы можете использовать пистолет в правой руке.
mode = heading[править]
{{Trait list by property|[[Has trait tier::Proficiency]]|mode=heading|heading level=h5}}
Волеборец
- Sword Proficiency — Вы можете использовать меч в любой руке.
Поборник
- Greatsword Proficiency — Вы можете использовать двуручный меч.
Клинковед
- Pistol Proficiency — Вы можете использовать пистолет в левой руке.
Механист
- Mace Proficiency — Вы можете использовать булаву в правой руке.
Призрак
- Scepter Proficiency — Вы можете использовать скипетр в правой руке.
Катализатор
- Hammer Proficiency — Вы можете использовать молот.
Виртуоз
- Dagger Proficiency — Вы можете использовать кинжал в правой руке.
Предвестник
- Pistol Proficiency — Вы можете использовать пистолет в правой руке.