Шаблон:Trait list by property — различия между версиями

Материал из Guild Wars 2 wiki
Перейти к: навигация, поиск
 
(не показана 1 промежуточная версия этого же участника)
Строка 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]]}}}}}}<!--
Строка 12: Строка 12:
 
  | ?Is in trait line.Has canonical name <!-- 8 -->
 
  | ?Is in trait line.Has canonical name <!-- 8 -->
 
  | ?Is in trait line.Has game icon      <!-- 9 -->
 
  | ?Is in trait line.Has game icon      <!-- 9 -->
  | format = plainlist
+
  | format = template
  | template = Trait list by property result format{{!}}mode={{{mode|plain}}}{{!}}suffix={{{suffix|description}}}{{!}}heading level={{{heading level|h3}}}
+
  | 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. Heading level, defaults to "h3".
+
: 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]]}}

mode = heading[править]

{{Trait list by property|[[Has trait tier::Proficiency]]|mode=heading|heading level=h5}}

Willbender Волеборец

Vindicator Поборник

Bladesworn Клинковед

Mechanist Механист

Specter Призрак

Catalyst Катализатор

Virtuoso Виртуоз

Harbinger Предвестник