Редактирование: Шаблон:Achievement list

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

Внимание! Вы не авторизовались на сайте. Ваш IP-адрес будет публично видимым, если вы будете вносить любые правки. Если вы войдёте или создадите учётную запись, правки вместо этого будут связаны с вашим именем пользователя, а также у вас появятся другие преимущества.

Правка может быть отменена. Пожалуйста, просмотрите сравнение версий, чтобы убедиться, что это именно те изменения, которые вас интересуют, и нажмите «Записать страницу», чтобы изменения вступили в силу.

На этой странице невозможны семантические аннотации в тексте из-за ограничений пространства имён. Детали относительно того, как разрешить пространство имен, находятся в справочной странице конфигурации.

Текущая версия Ваш текст
Строка 1: Строка 1:
<includeonly>{| {{STDT|mech1 no-odd-even {{#if: {{{expandable|}}} | expandable }} }} style="display:table;"
+
<includeonly>{{#if:<!-- Hide whitespace -->
{{#ask:[[Has achievement category::{{{category|+}}}]]<!-- Every achievement has a category -->
+
{{#vardefine:category_icon|{{#show:{{{category|}}}|?Has game icon|link=none}}}}
       {{#if: {{{activity|}}} | [[Is part of activity::{{{activity}}}]] }}
+
}}{| {{STDT|mech1}} {{#vardefine:table_tier_total|0}}<!-- Set to zero for each call -->
       {{#if: {{{parent|}}} | [[Is part of achievement::{{{parent}}}]] }}
+
!style="font-size:large;" | {{#if:{{{category|}}}|<div style="position:absolute; top:0; left:5px; z-index:1;">[[{{#var:category_icon}}{{!}}48px]]</div>}} Достижение
       {{#if: {{{reward|}}} | [[Gives item::{{{reward}}}]] }}
+
! colspan="2" style="text-align: right; border-left-width: 0;" | {{mastery point|{{#var_final:mastery_total|0}}|region={{#var_final:mastery_type|Default}}}} {{ap|{{#var_final:table_tier_total}}}} <!-- Parsing takes place in template:Achievement list result format
       {{#if: {{{mastery|}}} | [[Gives mastery track region point::{{{mastery}}}]] }}
+
-->{{#ask:[[Has achievement category::{{{category|+}}}]]<!-- Every achievement has a category -->
| ?Has canonical name                 <!-- {{{2}}} -->
+
      {{#if:{{{page|}}}|[[Has achievement page::~*{{#replace:{{{page}}}| |?}}*]]}}<!-- Value contains base page name, replace space with wildcard to query properly -->
| ?Has achievement type               <!-- {{{3}}} -->
+
      {{#if:{{{type|}}}|[[Has achievement type::{{{type}}}]]}}
| ?Has game description               <!-- {{{4}}} -->
+
       {{#if:{{{activity|}}}|[[Is part of activity::{{{activity}}}]]}}
| ?Has prerequisite                   <!-- {{{5}}} -->
+
       {{#if:{{{parent|}}}|[[Is part of achievement::{{{parent}}}]]}}
| ?Gives item                         <!-- {{{6}}} -->
+
       {{#if:{{{reward|}}}|[[Gives item::{{{reward}}}]]}}
| ?Gives item quantity               <!-- {{{7}}} -->
+
       {{#if:{{{mastery|}}}|[[Gives mastery track region point::{{{mastery}}}]]}}
| ?Gives title                       <!-- {{{8}}} -->
+
|?Has canonical name
| ?Has achievement tiers             <!-- {{{9}}} -->
+
|?Has achievement type
| ?Has achievement category           <!-- {{{10}}} -->
+
|?Has game description
| ?Has flavor text                   <!-- {{{11}}} -->
+
|?Has prerequisite
| ?Has achievement page               <!-- {{{12}}} -->
+
|?Gives item
| ?Has unlock item                   <!-- {{{13}}} -->
+
|?Gives item quantity
| ?Has game icon                     <!-- {{{14}}} -->
+
|?Gives title
| ?Gives mastery track region point   <!-- {{{15}}} -->
+
|?Has achievement tiers
| ?Has game id#                      <!-- {{{16}}} -->
+
|?Has achievement category
| ?Is hidden achievement              <!-- {{{17}}} -->
+
|?Has flavor text
| ?Has achievement tier rewards      <!-- {{{18}}} -->
+
|?Has achievement page
| ?Has achievement collection        <!-- {{{19}}} -->
+
|?Has unlock item
| ?Has achievement objectives        <!-- {{{20}}} -->
+
|?Has game icon
| ?Has achievement page section      <!-- {{{21}}} -->
+
|?Gives mastery track region point
| ?Gives mastery track region point quantity <!-- {{{22}}} -->
+
|link = none
| ?Has achievement category.Has canonical name <!-- {{{23}}} -->
+
|format = template
| link = none
+
|template = Achievement result format
| format = template
+
|sort = {{#if: {{{mastery|}}} | Has achievement category, Has canonical name }},
| introtemplate = Achievement list header{{!}}heading={{{heading|}}}
 
| template = Achievement box result format{{!}}reward={{{reward|}}}{{!}}expanded={{#if: {{{expanded|}}}|true|false}}{{!}}hide collection={{#if: {{{hide collection|}}}|true|false}}
 
| sort = {{{sort| {{#if: {{{mastery| }}} | Has achievement category, Has canonical name }},}}}
 
 
| limit = 250
 
| limit = 250
| default = {{#if: {{NAMESPACE}}||[[Category:Pages with empty semantic mediawiki query results]]}}
 
 
}}
 
}}
 
|}</includeonly><noinclude>
 
|}</includeonly><noinclude>
== Description ==
 
Generates a list of achievements for the set parameters. If the query returns only one result, then it mirrors the format from {{tl|Achievement box}} (used for single achievements) by suppressing the additional heading. Format using {{tl|Achievement box result format}} and {{tl|Achievement list header}}.
 
  
 
== Usage ==
 
== Usage ==
 +
Generates a list of achievements for the activity. Format using {{tl|Achievement result format}}.
 +
 
<pre>
 
<pre>
 
{{Achievement list
 
{{Achievement list
| category =  
+
| page =
| activity =  
+
| category =
 +
| type =
 +
| activity =
 
| reward =  
 
| reward =  
 
}}
 
}}
 
</pre>
 
</pre>
  
=== Parameters ===
+
== Parameters ==
 +
;page
 +
:Query for achievements related to a specific article on the site.
 +
:* Use {{tl|achievement}} for achievement-specific articles.
 +
:* Use this to identify achievements related to existing articles on the wiki, usually identified by already having an infobox.
 +
:* Keep in mind this is arbitrary and can pick up any other property that is a ''page'' property, such as ''activity'' and ''category''.
 
;category
 
;category
:Optional. Constrain to achievements in a certain achievement category.
+
:Constrain to achievements in a certain achievement category.
 +
;type
 +
:Constrain achievements to a specific achievement type.
 
;activity
 
;activity
:Optional. Constrain achievements to a related activity.
+
:Constrain achievements to a related activity.
 
;reward
 
;reward
:Optional. The item received upon completion of the achievement.
+
:The item received upon completion of the achievement.
 
;mastery
 
;mastery
:Optional. The mastery point reward given, e.g. "Central Tyria" or "Heart of Maguuma"
+
:The mastery point reward given, e.g. "Central Tyria" or "Heart of Maguuma"
;heading
 
:Optional. Change the heading for the table from "Achievements" to whatever is specified.
 
;expandable
 
:Optional. Avoid using this where possible. If set, causes the achievement list to be collapsed into a small element with a button to "show" the list.
 
;expanded
 
:Optional. If set, fully expands the collapsed tier, objectives and tier rewards subtables.
 
;hide collection
 
:Optional. If set, hides the collection.
 
;sort
 
:Optional. Allows to sort by a list of properties.
 
  
=== Examples ===
+
== Examples ==
<pre>{{achievement list|reward=Adventurer's Box}}</pre>
+
<pre>
{{achievement list|reward=Adventurer's Box}}
+
{{achievement list
 
+
|activity=Sanctum Sprint
<pre>{{achievement list|reward=Ascended Weapon Chest}}</pre>
+
}}
{{achievement list|reward=Ascended Weapon Chest}}
+
</pre>
 
+
{{achievement list
<pre>{{achievement list|activity=Sanctum Sprint}}</pre>
+
|activity=Sanctum Sprint
{{achievement list|activity=Sanctum Sprint}}
+
}}
 
 
== See also ==
 
* {{tl|achievement box}} — for single achievements
 
  
[[Category:Achievement formatting templates]]
+
[[Category:Achievement formatting templates|Achievement list]]
 
</noinclude>
 
</noinclude>

Пожалуйста, учтите, что любой ваш вклад в проект «Guild Wars 2 wiki» может быть отредактирован или удалён другими участниками. Если вы не хотите, чтобы кто-либо изменял ваши тексты, не помещайте их сюда.
Вы также подтверждаете, что являетесь автором вносимых дополнений, или скопировали их из источника, допускающего свободное распространение и изменение своего содержимого (см. Guild Wars 2 wiki:Авторские права). НЕ РАЗМЕЩАЙТЕ БЕЗ РАЗРЕШЕНИЯ ОХРАНЯЕМЫЕ АВТОРСКИМ ПРАВОМ МАТЕРИАЛЫ!

Чтобы изменить эту страницу, пожалуйста, ответьте на приведённый ниже вопрос (подробнее):

Отменить | Справка по редактированию (в новом окне)

Эта страница относится к одной скрытой категории: